Step 1: Create a Payment Intent
There are two approaches depending on when the payment method is available:- Direct payment
- Delayed confirmation
Include API reference: Create Payment Intent
payment_method in the creation request. The payment processes immediately.Step 2: Handle the response
Check theintent_status field in the response to determine what to do next:
intent_status | Action |
|---|---|
SUCCEEDED | Payment complete. Update your order status. |
REQUIRES_CUSTOMER_ACTION | The customer needs to complete an additional step (e.g., 3DS verification). See Handle customer actions. |
REQUIRES_PAYMENT_METHOD | The payment attempt failed. Prompt the customer to try another payment method or card. |
PENDING | Payment is processing. Wait for the webhook notification. |
Successful response example
Step 3: Handle customer actions
Whenintent_status is REQUIRES_CUSTOMER_ACTION, the next_action field tells you what the customer needs to do.
3DS redirect
If the card requires 3D Secure authentication,next_action contains a redirect URL:
return_url. For detailed 3DS integration guidance, see:
QR code display
For e-wallet payments (AlipayCN, WeChatPay, etc.),next_action may contain a QR code:
Step 4: Get payment results
Use one or both of these methods to confirm the final payment status:Webhooks (recommended)
Configure your server to receive asynchronous notifications from UQPAY. This is the most reliable method. Key webhook events:acquiring.payment_intent.succeeded— payment completedacquiring.payment_attempt.failed— payment attempt failed. Note:acquiring.payment_intent.failedis only triggered when the PI times out and auto-closes (30-minute expiry), not on individual attempt failures.acquiring.payment_attempt.capture_requested— capture submitted. Receiving this event also indicates the payment has succeeded.
Retrieve API (polling)
Query the payment status directly:E-wallet payments
The same API supports e-wallet payment methods. Replace thepayment_method object with the appropriate wallet type:
AlipayCN QR code example
AlipayCN QR code example
next_action.display_qr_code for the customer to scan.AlipayCN payment code example (in-person)
AlipayCN payment code example (in-person)

