Order Processing

  1. Creating an order in the InPost Pay app [1-8]:

    1. The Customer moves to the basket in the InPost Pay app, completes the data required for the order (delivery form and address, invoicing data), chooses the form of payment, and initiates the order creation process and the payment process by pressing the button "Kupuję i Płacę (Buy and pay)".

  2. After the purchasing process is initiated by the customer, InPost Pay collects from the Merchant the updated basket (with the use of the GET/v1/izi/basket/{basket_id} method), and verifies, whether or not the content of the basket kept in InPost Pay is compliant with the basket provided by the Merchant (verification by means of calculating the hash).

    1. If the basket in the InPost Pay app is invalid, the customer is presented with the respective message -the process of creating an order for an invalid basket is over.

    2. If the basket in the InPost Pay app is valid, the POST/v1/izi/order method is called to the Merchant to create the order.
      The link to call the method: GET/v1/izi/basket/{basket_id} as an example.

  3. After the order was created correctly, the Merchant provides InPost Pay with the order details according to the scheme in the response POST/v1/izi/order.

    1. Link to calling the method: POST/v1/izi/order as an example.

Paying for the order in the InPost Pay app [9-19]:

  1. After being notified of an order created, InPost Pay assigns order_status = ORDER_PROCESSING and payment_status = UNPAID, and initiates the payment process, where, sequentially together with the stages of making the payment by the customer, it assigns and saves the following data:

    1. payment_status = STARTED - commencing the payment by the customer in the InPost app, and generating and recording the payment's reference data

    2. payment_status = PENDING - the payment made by the customer in the InPost App and awaits to be made in the payment gate

    3. payment_status = AUTHORIZED - the payment implemented successfully in the payment gate and recording the payment's data in the order details.

  2. After the successful completion of the payment, the customer is notified in the InPost app of the successful payment for the order, and InPost Pay sends the request to the POST/v1/izi/order/{order_id}/event endpoint in order to notify the Merchant of the payment made.

    Link to calling the method: POST/v1/izi/order/{order_id}/event as an example.

  3. The widget observes the Merchant's backend for the associated basket (with the use of looping, or websocket), to see if the order was completed. Upon receiving the information of the completion, the widget shows the screen with the thank you message for the finalization of the order.



Diagram UC.05 Execution of the order


Video showing the purchasing process in the mobile app: