Scenario Overview#
When a user places an order to buy a product and chooses to pay using SPARK, the merchant application needs to call the unified checkout payment interface to create a payment order, specify the payment account, and have the user log in to complete the payment.SPARK supports the following two payment scenarios:2.
Buyers within the merchant application paying sellers, with support for splitting payments among the merchant platform or other lower-level business roles.
Flowchart#
Key Steps Explained:
Step 2: After a successful order on the merchant platform, the merchant calls the payment platform's Payment Order Creation to generate a prepayment transaction and obtain the cashier payment link, cashier_url;
After the merchant calls the Payment Order Creation , there can be normal and abnormal return cases:Normal Return: Returns cashier_url. The merchant can proceed to the next step using the returned cashier_url.
Abnormal Return: Returns an HTTP code or error code. The merchant can troubleshoot the reason based on the error code from the interface and take the next steps.
Steps 7-9: After the user successfully pays, the merchant can obtain the order status through two methods:Method 1: Payment Result Notification. After the user successfully pays, the payment platform will sync the successful payment result back to the merchant in the form of a callback notification. The merchant's callback address needs to include the notify_url parameter when calling the payment platform's Payment Order Creation : If the merchant does not receive the callback notification due to network fluctuations or issues with the notify_url itself, they can proactively call the Payment Order Query API to retrieve the order status. Modified at 2024-09-12 06:11:44