Binding a basket with InPost Pay using phone number

  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.

 

  1. The customer defines the phone number and presses "Połącz (connect)".

  2. The Widget calls the method iziGetPayData, which downloads the data necessary to pair baskets and contains the method iziGetBrowserData which returns the browser data to the Merchant's backend, which, using the method POST/v1/izi/basket/{basket_id}/binding, transfers the phone number to InPost Pay. InPost Pay verifies the security/spam rules of the binding for the phone number. In the case of:

    1. positive verification, it sends the response (202) to the Merchant, and sends the notifications (push) to the client's device.

    2. negative verification, the basket binding process is finished (InPost Pay returns an error code to the Merchant's backend).

  3. The widget presents the message

  4. With the push notification, the customer starts the InPost app:

    1. approves the binding of the basket

    2. signs into InPost Pay and approves the binding of the basket.

  5. InPost Pay binds the basket (the basket's id sent by the Merchant) with the phone number and notiifies the Merchant of binding the basket using the POST/v1/izi/basket/{basket_id}/confirmation method.

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

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

  8. 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.

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

  10. 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. Upon receiving the information of the completion, the widget notifies the customer showing the screen with thanks for the finalization of the order.

 

 

Diagram UC.03 Binding a basket with InPost Pay using a phone number