Skip to main content
This guide walks you through a complete card-not-present (online) payment flow using the direct API integration. You create a Payment Intent, handle authentication if required, and receive the payment result.

Step 1: Create a Payment Intent

There are two approaches depending on when the payment method is available:
Include payment_method in the creation request. The payment processes immediately.
API reference: Create Payment Intent

Step 2: Handle the response

Check the intent_status field in the response to determine what to do next:

Successful response example

Step 3: Handle customer actions

When intent_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:
Redirect the customer to the URL. After they complete 3DS, they are redirected to your 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:
Display the QR code to the customer and wait for them to scan and confirm payment in their wallet app.

Step 4: Get payment results

Use one or both of these methods to confirm the final payment status: Configure your server to receive asynchronous notifications from UQPAY. This is the most reliable method. Key webhook events:

Retrieve API (polling)

Query the payment status directly:
API reference: Retrieve Payment Intent

E-wallet payments

The same API supports e-wallet payment methods. Replace the payment_method object with the appropriate wallet type:
The response will contain next_action.display_qr_code for the customer to scan.
Payment code transactions complete immediately when the code is valid.
For a full list of supported payment methods and their parameters, see Payment methods.