Binding a basket with InPost Pay using qrCode

  1. The Client goes to the Merchant's website.

  2. The Merchant builds the store's website with an embedded widget with the message:

    1. "Utwórz koszyk z InPost Pay (Create a basket with InPost Pay)" -widget embedded on the product card

      image-20240102-095243.png
    2. "Kup z InPost Pay (Buy with InPost Pay)" -widget embedded in the basket

      image-20240103-102532.png
  3. The customer presses the widget "Utwórz koszyk z InPost Pay (Create a basket with InPost Pay)", or "Kup z InPost Pay (Buy with InPost Pay)".

  4. The Widget verifies in the Merchant's backend, whether or not the chosen product is available for adding to the basket (iziCanBeBound).

  5. At the first method called by the Widget, the Merchant's backend calls the method to InPost Pay to verify whether or not the customer's basket is bound to InPost Pay, and whether or not the browser the customer currently uses is among the trusted ones. The verification takes place through the request GET/v1/izi/basket/{basket_id}/binding.

  6. InPost Pay returns the information that the basket is not linked (basket_linked=false), and the browser is not trusted (browser_trusted=false).

  7. The Widget adds the product to the basket in the Merchant's store (iziAddToCart).

  8. The Widget presents the default screen for binding the basket using a telephone number.

  9. The Customer selects "Zrób to z kodem QR (Do it with the QR code)".

  10. The Widget calls the method iziGetPayData, which downloads the data necessary for the coupling process to the Merchant's backend, which, using the method POST/v1/izi/basket/{basket_id}/binding, collects qrCode from InPost Pay.

  11. The widget starts observing the merchant's backend (with the use of looping, or websocket) whether or not the Merchant's backend was notified of the binding of the basket (iziGetIsBound).

  12. InPost Pay generates a qrCode/deep link, which then, through the Merchant's backend, is transferred to the Widget, in order to be presented to the customer.

  13. The Customer initiates the binding proces with the use of:

    1. the InPost's mobile app - using which they scan the qrCode, or

    2. a deep link, which redirects to the completion of the process in the InPost Pay app (the deep link is used only on mobile devices).

  14. Upon initiating the process, depending on whether the client has signed a contact in the InPost Pay app or not, they go to the right flow (binding the basket automatically or onboarding to InPost Pay).

  15. InPost Pay notifies the Merchant of binding the basket using the POST/v1/izi/basket/{basket_id}/confirmation.

  16. Upon receiving the POST/v1/izi/basket/{basket_id}/confirmation which confirms the successful binding of the basket, the Merchant's backend transfers the details of the basket in InPost Pay in the response.

  17. InPost Pay binds the basket (the basket's id assigned by the Merchant) to the phone number.

  18. The Merchant's backend transfers the information about the binding of the basket to the Widget (response iziGetIsBound).

  19. The Widget presents the customer with the information on the Widget "Produkty w koszyku InPost Pay (Products in InPost Pay basket)", and saves browser_id in the browser cookies.

  20. The InPost Pay app presents the basket bound to the customer.

  21. After obtaining the information that the basket is now linked, the Widget starts observing the Merchant's backend (with the use of iziGetOrderComplete and one of the looping or websocket methods), to see if the order was completed for the basket. If it receives the information of the realization, the Widget presents the customer with a screen with the acknowledgement for finalizing the order.

 

Diagram UC.02 Binding a basket with InPost Pay using qrCode