On this page
No Headings
Last updated: July 10, 2026
Alipay is a third-party mobile and online payment platform used to make cashless payments over the world.
| Buyer Countries | Payment type | Payment flow | Currencies | Maximum amount | Refunds |
|---|---|---|---|---|---|
China (CN) | Wallet | redirect | AUD CAD EUR GBP HKD NZD SGD USD | N/A | Within 360 days |
Request approval to enable Alipay by visiting these Sandbox and Live links:
For Partners: Be sure to onboard your merchants before they accept payments (upfront). Onboarding after making payments, specifically Progressive Onboarding, is not supported for APMs.
Integration steps for implementing alternate payment methods are similar. If an alternate payment method has been previously integrated, most of the code may be reused.
Make sure you're subscribed to the following webhook events:
PAYMENT.CAPTURE.COMPLETED webhook event indicates a successful order capture.PAYMENT.CAPTURE.DENIED webhook event indicate a failed order capture.After you receive each webhook, fetch the latest order details using Show order details. The up HATEOAS link in the webhook payload indicates the order associated with the capture.
When processing Alipay payments, you don't need to capture payment for the order.
You'll need to create the user interface to offer Alipay and collect the payer's full name. Then you'll use the API calls described in the remainder of this topic to:
full name, and the country_code.Refer to Payment method icons for icons you to use on your checkout page.
Use the payer information you captured from your user interface to create an order with Alipay as the payment source.
API endpoint used: Create order
curl --location --request POST 'https://api-m.sandbox.paypal.com/v2/checkout/orders' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ACCESS-TOKEN' \
--header 'PayPal-Request-Id: PAYPAL-REQUEST-ID' \
--data-raw '{
"intent": "CAPTURE",
"payment_source": {
"alipay": {
"country_code": "CN",
"name": "John Doe"
}
},
"processing_instruction": "ORDER_COMPLETE_ON_PAYMENT_APPROVAL",
"purchase_units": [
{
"invoice_id": "Invoice-12345",
"custom_id": "Custom-1234",
"amount": {
"currency_code": "HKD",
"value": "49.11"
},
"shipping": {
"name": {
"full_name": "John Doe"
},
"address": {
"address_line_1": "HongKong Rd East, 126",
"address_line_2": "Floor 5",
"admin_area_2": "Qingdao",
"admin_area_1": "rm",
"postal_code": "266071",
"country_code": "CN"
}
}
}
]
}'After you copy the code in the sample request, modify the following:
ACCESS-TOKEN - Your access token.PAYPAL-REQUEST-ID - Replace the sample ID with a unique ID that you generate. The PAYPAL-REQUEST-ID helps prevent duplicate authorizations if the API call is disrupted. For more information about idempotent requests, see API idempotency.intent - Set this value to CAPTURE.payment_source - Specify alipay, and include the following:country_codename - The payer's full name.experience_context - Specify the following:locale - The preferred language for returned errorsreturn_url - The URL the buyer is returned to after approving the purchase with their selected payment method.cancel_url - The URL the buyer is returned to after canceling an approval with their selected payment method.processing_instruction - Set this value to ORDER_COMPLETE_ON_PAYMENT_APPROVAL.purchase_units: amount - Specify the value of the order and the currency code.Note: Change or add other parameters in the Create order request body to create an order that reflects the actual order details.
A successful request results in the following:
200 OK.{
"id": "5V159329PV571861D",
"status": "PAYER_ACTION_REQUIRED",
"payment_source": {
"alipay": {
"name": "John Doe",
"country_code": "CN"
}
},
"links": [
{
"href": "https://api-m.sandbox.paypal.com/v2/checkout/orders/5V159329PV571861D",
"rel": "self",
"method": "GET"
},
{
"href": "https://www.sandbox.paypal.com/payment/alipay?token=5V159329PV571861D",
"rel": "payer-action",
"method": "GET"
}
]
}In your user interface, attach the payer-action redirect URL returned in the Create Order response to the Alipay payment button. This sends the payer to their wallet to approve the purchase. After the payer approves the purchase, the payment is automatically captured.
In the sample, the redirect URL is: "https://www.sandbox.paypal.com/payment/alipay?token=5V159329PV571861D".
After successfully completing the wallet transaction:
return_url in the Create Order request.PAYMENT.CAPTURE.COMPLETED webhook event is triggered, indicating successful payment capture.After an unsuccessful bank approval, the payer is redirected to the cancel_url in the Create Order request.
The following webhooks provide the result of order capture:
PAYMENT.CAPTURE.COMPLETED webhook event indicates a successful order capture.PAYMENT.CAPTURE.DENIED webhook events indicate a failed order capture.up HATEOAS link indicates the order associated with this capture.Here are some additional resources as you create webhook handler code:
{
"id": "WH-9LK14475MF9937440-9EG47645TP521822L",
"event_version": "1.0",
"create_time": "2022-05-10T06:04:12.533Z",
"resource_type": "capture",
"resource_version": "2.0",
"event_type": "PAYMENT.CAPTURE.COMPLETED",
"summary": "Payment completed for HKD 100.0 HKD",
"resource": {
"amount": {
"value": "100.00",
"currency_code": "HKD"
},
"supplementary_data": {
"related_ids": {
"order_id": "5V159329PV571861D"
}
},
"update_time": "2022-01-19T06:04:08Z",
"create_time": "2022-01-19T06:04:08Z",
"final_capture": true,
"seller_receivable_breakdown": {
"paypal_fee": {
"value": "3.80",
"currency_code": "HKD"
},
"gross_amount": {
"value": "100.00",
"currency_code": "HKD"
},
"net_amount": {
"value": "96.20",
"currency_code": "HKD"
}
},
"custom_id": "Custom-1234",
"invoice_id": "Invoice-12345",
"links": [
{
"method": "GET",
"rel": "self",
"href": "https://api-m.sandbox.paypal.com/v2/payments/captures/5R102774VL663561J"
},
{
"method": "POST",
"rel": "refund",
"href": "https://api-m.sandbox.paypal.com/v2/payments/captures/5R102774VL663561J/refund"
},
{
"method": "GET",
"rel": "up",
"href": "https://api-m.sandbox.paypal.com/v2/checkout/orders/5V159329PV571861D"
}
],
"id": "5R102774VL663561J",
"status": "COMPLETED"
},
"links": [
{
"href": "https://api-m.sandbox.paypal.com/v1/notifications/webhooks-events/WH-9LK14475MF9937440-9EG47645TP521822L",
"rel": "self",
"method": "GET"
},
{
"href": "https://api-m.sandbox.paypal.com/v1/notifications/webhooks-events/WH-9LK14475MF9937440-9EG47645TP521822L/resend",
"rel": "resend",
"method": "POST"
}
]
}Note: The order ID should match the resource.supplementary_data.related_ids.order_id parameter in the webhook payload.
{
"id": "WH-9LK14475MF9937440-9EG47645TP521822L",
"event_version": "1.0",
"create_time": "2022-05-10T06:04:12.533Z",
"resource_type": "capture",
"resource_version": "2.0",
"event_type": "PAYMENT.CAPTURE.DENIED",
"summary": "Payment denied for HKD 100.0 HKD",
"resource": {
"amount": {
"value": "100.00",
"currency_code": "HKD"
},
"supplementary_data": {
"related_ids": {
"order_id": "5V159329PV571861D"
}
},
"update_time": "2022-05-10T06:04:08Z",
"create_time": "2022-05-10T06:04:08Z",
"final_capture": true,
"seller_receivable_breakdown": {
"paypal_fee": {
"value": "3.80",
"currency_code": "HKD"
},
"gross_amount": {
"value": "100.00",
"currency_code": "HKD"
},
"net_amount": {
"value": "96.20",
"currency_code": "HKD"
}
},
"links": [
{
"method": "GET",
"rel": "self",
"href": "https://api-m.sandbox.paypal.com/v2/payments/captures/5R102774VL663561J"
},
{
"method": "POST",
"rel": "refund",
"href": "https://api-m.sandbox.paypal.com/v2/payments/captures/5R102774VL663561J/refund"
},
{
"method": "GET",
"rel": "up",
"href": "https://api-m.sandbox.paypal.com/v2/checkout/orders/5V159329PV571861D"
}
],
"id": "5R102774VL663561J",
"status": "DECLINED"
},
"links": [
{
"href": "https://api-m.sandbox.paypal.com/v1/notifications/webhooks-events/WH-9LK14475MF9937440-9EG47645TP521822L",
"rel": "self",
"method": "GET"
},
{
"href": "https://api-m.sandbox.paypal.com/v1/notifications/webhooks-events/WH-9LK14475MF9937440-9EG47645TP521822L/resend",
"rel": "resend",
"method": "POST"
}
]
}Note: The order ID should match the resource.supplementary_data.related_ids.order_id parameter in the webhook payload.
You can also get the order capture result from the Show order details endpoint.
Note: Rate limits apply on API requests for order capture results using the Show order details endpoint.
curl -v -X GET https://api-m.sandbox.paypal.com/v2/checkout/orders/5V159329PV571861D \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ACCESS-TOKEN"{
"id": "5V159329PV571861D",
"intent": "CAPTURE",
"status": "COMPLETED",
"payment_source": {
"alipay": {
"name": "John Doe",
"country_code": "CN"
}
},
"processing_instruction": "ORDER_COMPLETE_ON_PAYMENT_APPROVAL",
"purchase_units": [
{
"reference_id": "default",
"amount": {
"currency_code": "HKD",
"value": "100.00"
},
"payments": {
"captures": [
{
"id": "5R102774VL663561J",
"status": "COMPLETED",
"amount": {
"currency_code": "HKD",
"value": "100.00"
},
"final_capture": true,
"seller_receivable_breakdown": {
"gross_amount": {
"currency_code": "HKD",
"value": "100.00"
},
"paypal_fee": {
"currency_code": "HKD",
"value": "3.80"
},
"net_amount": {
"currency_code": "HKD",
"value": "96.20"
}
},
"links": [
{
"href": "https://api-m.sandbox.paypal.com/v2/payments/captures/5R102774VL663561J",
"rel": "self",
"method": "GET"
},
{
"href": "https://api-m.sandbox.paypal.com/v2/payments/captures/5R102774VL663561J/refund",
"rel": "refund",
"method": "POST"
},
{
"href": "https://api-m.sandbox.paypal.com/v2/checkout/orders/5V159329PV571861D",
"rel": "up",
"method": "GET"
}
]
}
]
}
}
],
"links": [
{
"href": "https://api-m.sandbox.paypal.com/v2/checkout/orders/5V159329PV571861D",
"rel": "self",
"method": "GET"
}
]
}A successful request returns the HTTP 200 OK status code with a JSON response body that returns a COMPLETED status.
A captured order has the following:
COMPLETED order status, which means the order was captured successfully.COMPLETED status is present in the response parameter purchase_units[0].payments.captures[0].up HATEOAS link indicates the order associated with this capture.After a successful payment, notify the payer of a successful transaction.
Test in PayPal sandbox, then go live in PayPal's production environment.