Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
The Client goes to the Merchant's website.
The Merchant builds the store's website with an embedded widget with the message:
"Utwórz koszyk z InPost Pay (Create a basket with InPost Pay)" -widget embedded on the product card
"Kup z InPost Pay (Buy with InPost Pay)" -widget embedded in the basket
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)".
The Widget verifies in the Merchant's backend, whether or not the chosen product is available for adding to the basket (iziCanBeBound).
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.
InPost Pay returns the information that the basket is not linked (basket_linked=false), and the browser is not trusted (browser_trusted=false).
The Widget adds the product to the basket in the Merchant's store (iziAddToCart).
The Widget presents the default screen for binding the basket using a telephone number.
The Customer selects "Zrób to z kodem QR (Do it with the QR code)".
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.
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).
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.
The Customer initiates the binding proces with the use of:
the InPost's mobile app - using which they scan the qrCode, or
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).
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).
InPost Pay notifies the Merchant of binding the basket using the POST/v1/izi/basket/{basket_id}/confirmation.
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.
InPost Pay binds the basket (the basket's id assigned by the Merchant) to the phone number.
The Merchant's backend transfers the information about the binding of the basket to the Widget (response iziGetIsBound).
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.
The InPost Pay app presents the basket bound to the customer.
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