This guide introduces the detailed back-end payment flow with the Subotiz API and that under the scenario of 3DS verification to help better understand how the integration method works.
Payment flow
- When your client-side application has collected the customer's payment information, it sends a payment request to your server. Your server then uses the Subotiz API to create a trade order and initiate the payment process.
- Subotiz submits the payment request to the relevant payment provider using the provided payment information and returns the submission result to your server, including applicable trade order data.
- Your server polls the created trade order via the Subotiz API to check its status and determines the final payment result based on the trade order's status.
Payment flow diagram (API)
Redirecting payment flow
Take 3DS verification as an example
- When a customer is ready to pay for a subscription renewal, your client-side application sends a payment confirmation request to your server. Your server then calls the Subotiz API to create a trade order and initiate payment, passing the
return_urlparameter (the URL to redirect to after 3D Secure authentication is completed). - The Subotiz system submits the payment request to the relevant payment provider based on the trade order information and returns the processing result to your server.
Key note: For transactions requiring 3D Secure (3DS) authentication, the response will include anext_actionobject of typeredirect, containing thenext_action.redirect.urlfield (the URL to redirect the customer to for 3DS authentication). Your server must pass this URL to the client for redirection.
- Your client-side application redirects the customer to the provided 3DS authentication URL to complete the verification process (e.g., entering an SMS code, confirming the transaction). After completion, the 3DS system notifies Subotiz of the result (success or failure). Subotiz then updates the trade order status and redirects the customer back to the
return_urlprovided in Step 1. - Your server polls the created trade order via the Subotiz API to check its status and determines the final payment result based on the trade order's status.
Redirecting payment flow diagram
Completing a payment process with the Subotiz API empowers you to have full control of your brand identity and makes for an extremely seamless payment experience for your customers. However, it currently supports credit and debit card payments only, so we do not recommend this integration method. If you still have demands on that, please contact developer@subotiz.com for integration assistance.