Local payment method (LPM) payments
Registered checkout integration steps described on this page are specific to local payment method (LPM) payments. For integrations related to card payments, see Registered user checkout.
Direct Debit
To set up Direct Debit for registered user checkout, you need to create a payment consent and verify it before you can collect subsequent payments. The verification process ensures that the customer has authorized the direct debit mandate.
Step 1: Create a Customer
If this is a new customer, create a Customer object using Create a Customer API API. The response will contain a unique id for the Customer. Save the customer_id for later use.
Step 2: Create a Payment Consent
Create a payment consent using Create a Payment Consent API API with the customer_id from Step 1. The response will contain a payment_consent_id. Save this payment_consent_id for subsequent transactions.
Step 3: Create a PaymentIntent (Optional)
If your shopper wishes to pay for the first order during the payment method binding process, create a PaymentIntent using Create a PaymentIntent API API with the customer_id from Step 1. Save the returned intent id and client_secret for Step 4.
Step 4: Verify the Payment Consent
Verify the payment consent using Verify Payment Consent API API. You have two options for verification:
Option 1: Verification only
For Direct Debit, Airwallex automatically sends a verification email to the shopper to complete the verification process. The shopper must click the link in the email to authorize the direct debit mandate.
For card payments, you can submit zero or supplementary amounts for the verification process. This automatically creates a PaymentIntent, which will be CANCELLED after verification is completed.
Option 2: Verification by completing first payment
If you created a PaymentIntent in Step 3, you can verify the payment consent by completing the first payment. Call Confirm PaymentIntent API API with the payment_consent_id. When verification is completed, the PaymentIntent status will be SUCCEEDED.
Step 5: Check verification status
After verification, the payment consent status changes to VERIFIED. If the payment consent is not verified, the status remains REQUIRES_PAYMENT_METHOD or REQUIRES_CUSTOMER_ACTION, and next_action appears in the response.
For card transactions in the EU region, if full 3D Secure (3DS) authentication is mandatory or triggered by fraud detection during verification, you can continue the verification by completing the payment using Confirm PaymentIntent Continue API API.
E-wallets
To set up E-wallet payments for registered user checkout, you need to create a payment consent and verify it through the authorization process. The verification requires redirecting the customer to complete the authorization with their E-wallet provider.
Step 1: Create a Customer
If this is a new customer, create a Customer object using Create a Customer API API. The response will contain a unique id for the Customer. Save the customer_id for later use.
Step 2: Create a Payment Consent
Create a payment consent using Create a Payment Consent API API with the customer_id from Step 1. The response will contain a payment_consent_id. Save this payment_consent_id for subsequent transactions.
Step 3: Verify the Payment Consent
Verify the payment consent using Verify Payment Consent API API. In the request, provide details in the payment_method object including flow and os_type for the E-wallet your customer selected.
Step 4: Complete the authorization
After initiating verification, you need to render the redirect page to the customer to complete the authorization with their E-wallet provider. Once the customer completes the authorization, the payment consent status changes to VERIFIED. You will receive a webhook notification of payment_consent.verified when the verification is complete.
If the payment consent is not verified, the status remains REQUIRES_PAYMENT_METHOD or REQUIRES_CUSTOMER_ACTION, and next_action appears in the response.
Subsequent transaction using saved payment details
For subsequent subscription and autodebit (MIT) transactions
- Create payment intent API with the corresponding customer ID.
- Confirm payment intent API with
payment_consent_idto request payment with reference to stored payment consent.
For subsequent one-click (CIT) transactions
- Create payment intent API with the corresponding customer ID.
- Query payment consent API with the corresponding customer ID to render the list of customer's payment consents they previously verified.
- Confirm payment intent API with
payment_consent_idto request payment with reference to stored Payment consent. If the subsequent payment is for card payment, 3DS might be triggered in the process.
Error cases
Use these test scenarios to trigger various error codes.
| Error Code | Test scenario |
|---|---|
resource_not_found | Create a payment consent with non-existing customer_id, non-existing payment_consent_id, or payment consent with DISABLED/REQUIRES_PAYMENT_METHOD or REQUIRES_CUSTOMER_ACTION statuses. |
invalid_status_for_operation | Confirm a payment consent with DISABLED/REQUIRES_PAYMENT_METHOD or REQUIRES_CUSTOMER_ACTION statuses. |
validation_error | Confirm a payment intent with payment consent without providing CVC. |
currency_not_supported | Confirm a payment intent with payment consent whose currency is different from the intent currency. |