Pay with Cashier (Website Browser) - Alipay Plus
Accept Alipay Plus cashier on your website by presenting payment method to the shopper.
Step 0. Authentication
How to obtain access token Authentication Reference
Step 1. Initialize a Payment Intent
POST
/mch-api/v1/pa/payment_intents/create
- Example Request
{
"amount": "1",
"currency": "USD",
"merchant_order_id": "P9297895081903",
"payment_method": {
"type": "aplus",
"aplus": {
"flow": "cashier",
"presentment_mode": "UNIFIED",
"payment_method": "CONNECT_WALLET",
"terminal_type": "WEB"
}
},
"description": "Online Payment",
"notify_url": "https://put_your_site_here/example_url"
}
- Request
REQUEST BODY | Details | Type | Required | Example | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
amount | Payment amount. This is the order amount you would like to charge your customer | string(32) | required | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
currency | Amount currency | string(3) | required | USD | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
settlement_currency | Using this settlement currency in this order. If not set, we will using default settlement currency | string(3) | optional | HKD | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
merchant_order_id | The order ID created in merchant's order system that corresponds to this PaymentIntent. Maximum length is 32. | string(32) | required | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
description | The description of the order | string | required | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
notify_url | The URL that is used to receive the payment result notification from CBTIS | string | optional | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
payment_method | object | required | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- type | Specific this payment channel (aplus) | string | required | aplus | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- aplus | object | required | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-- flow | Specific the payment flow | string | required | cashier | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-- presentment_mode | The presentation mode that the merchant wants to use to display the payment methods on the cashier page. (default:UNIFIED). The complete list of valid values: 1. UNIFIED 2.TILE | string | optional | UNIFIED | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-- payment_method | The type of payment method. (default:CONNECT_WALLET). You can using TILE mode you want to get payment directly. The complete list of valid values:
| string | optional | CONNECT_WALLET | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-- terminal_type | The type of terminal that is used to initiate the payment. (default:WEB). The complete list of valid values: 1. WEB: indicates that a PC browser is used. 2.WAP: indicates that a mobile browser is used. 3.APP: indicates that a mobile app is used. | string | required if (payment_method == CONNECT_WALLET) | WEB | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-- os_type | The mobile operating system type. The complete list of valid values: 1. IOS: 2.ANDROID | string | required if (terminal_type == APP or WAP) |
- Example Response
{
"code": 0,
"data": {
"order_id": "C991289984923795789123",
"merchant_order_id": "P9297895081903",
"amount": "50",
"currency": "HKD",
"create_time": "2023-08-31T04:44:05.928696203+08:00",
"next_action": {
"type": "redirect",
"url": "https://a.payment.link/code"
},
"status": "PENDING"
},
"message": "ok",
"rid": "3647575c0e1049439e484a231864da2c"
}
You should redirect the shopper to the Alipay Plus cashier page with the next_action.url returned in the Payment response.
Step 2. Get payment notify
Once you fill in the notify_url field when creating an order, after the user completes the payment, our system will prompt you with information about the user's completed payment.
How to verify our notify message Webhook Verify Reference
- Example Webhook
{
"notify_type": "payment_success",
"data": {
"settle_currency": "USD",
"create_time": "2025-03-27T10:32:11+08:00",
"pay_time": "2025-03-27T10:32:32+08:00",
"uid": 12009321,
"order_id": "C14042731016700000",
"merchant_order_id": "P19050854100199000000",
"order_amount": "50000",
"order_currency": "KRW"
}
}
Step 3. Retrieve a payment
Retrieve a payment by ID.
POST
/mch-api/v1/pa/payment_intents/query
- Example Request
{
"order_id": "P991289984923795789123",
"merchant_order_id": "P9297895081903"
}
- Request
REQUEST BODY | Details | Type | Required | Example |
---|---|---|---|---|
order_id | Platform order id from payment request. | string(32) | conditional (required if merchant_order_id is empty) | |
merchant_order_id | Merchant order id from your creation of payment. | string(32) | conditional (required if order_id is empty) |
- Example Response
{
"code": 0,
"data": {
"order_id": "C991289984923795789123",
"merchant_order_id": "P9297895081903",
"amount": "50",
"currency": "USD",
"status": "SUCCEEDED",
"create_time": "2023-08-31T04:44:05.928696203+08:00",
"pay_time": "2023-08-31T04:44:05.928696203+08:00"
},
"message": "ok",
"rid": "3647575c0e1049439e484a231864da2c"
}
- Explain of status
STATUS CODE | Details |
---|---|
PENDING | The Payment is pending the final result from the provider. No further action is required. |
SUCCEEDED | The Payment has succeeded. The payment transaction is complete. |
CANCELLED | Payment canceled or timeout, user has not completed the payment and the order has been closed. |