Integration overview
This post gives an overview of the payment flow from the perspective of all parties involved, and introduces the key factors for a functioned integration.
The payment flow
CHECKOUT
- You create a checkout via API invocation.
- You receive a checkout URL in the API response, which contains a checkout URL.
- You redirect your customer to the checkout URL.
- The customer selects a payment method (card, Apple Pay, Alipay, etc.) and completes the payment.
- The customer is redirected back to your website.
- WooshPay sends an HTTP request whose HTTP body is an Event JSON object to your webhook URL to notify the status change.
SDK
- Embed the code snippet into your checkout page.
- Invoke the API to create a payment intent.
- Use the payment intent ID to initiate the SDK widget, which eventually appears as a payment form.
- The customer completes the payment.
- WooshPay sends an HTTP request whose HTTP body is an Event JSON object to your webhook URL to notify the status change.
API
- Invoke the API to create a payment intent.
- Provide a payment method and confirm the payment intent.
- WooshPay sends an HTTP request whose HTTP body is an Event JSON object to your webhook URL to notify the status change. (Step 1 and step 2 could be combined into one API invocation.)
Integration Key Factors
The APIs could be divided into three main types:
Transaction API: Includes functionalities such as payment intent creation, checkout creation, refund creation, etc.
Webhook: Register one or more webhooks to receive server-to-server calls and obtain post-payment details.
Query: Retrieve a transaction by its ID. It's recommended that you retrieve a transaction in case you fail to receive or process a webhook event call.
In order to make the payment flow complete and smooth, you should implement these three types separately.
Last modified: 1 年前