Log inGet started
Airwallex logo
Home
Online Payments
Treasury
Transactional FX
Payouts
Issuing
Scale
Open Banking
Developer Tools
API Reference
Home
Online Payments
Overview
Starting with paymentsTransaction and settlement modelPricing model
Features
3D Secure authenticationSave payment details for future payments
Hosted Payment PageEmbedded ElementsRedirect/QR Code ElementDrop-in ElementMobile SDKNative API
Multi-currency pricingFraud managementRiskNetwork TokenizationDisputes

Native API

When capturing a Stored Credential for the first time

API-capturing credential

Card and Direct Debit

  1. Create customer API if it is a new customer
  2. Create payment consents API with the Customer ID from Step 1, and save Consent ID for subsequent transactions Note that A payment consent can be created without providing a payment method immediately. You can update payment_consents API to attach payment_method later on.
  3. (Optional) Create Payment Intent API for the order with the customer ID. This step is only needed for shopper wishes to pay for the first order in the payment method binding process.
  4. Verify payment_consents API through a transaction authorization or verification. You have 2 options for verifying the payment consent

    • Option 1 (verification only):For cards, you can submit zero or supplementary amounts for the verification process. This will automatically create payment intent, which will be CANCELLED after verification is completed. For Direct debit, Airwallex will send out verification email to the shopper automatically to complete verification process.
    • Option 2 (Verification by completing first payment): You can use the payment intent created in Step 3 to do verification by Confirm payment intent API with payment_consent_reference. This will result in payment intent to be SUCCEEDED when verification is completed.

    Successfully verifying a payment consent will result in the statuses of both payment consent and its payment method changed to VERIFIED. If payment consent is not verified, the status will stay as PENDING_VERIFICATION, and next_action will appear in the response.

    In case full 3DS authentication is mandatory (for card transactions in EU region) or triggered by fraud detection during a card verification, you can continue the verification by finishing the payment using payment_intents/confirm_continue API.

E-wallet (eg. Kakaopay)

  1. Create customer APIif it is a new customer
  2. Create payment consent API with the customer you created in Step 1 and save Consent ID for subsequent transactions Note that A payment consent can be created without providing a payment method immediately. You can update payment_consents APIto attach payment_method later on.
  3. Verify payment_consents API through the authorization process. Provide details in verification_options including flow and os_type for the e-wallet your customer selected. Verifying a payment consent will result in the status of payment consent changed to VERIFIED. If payment consent is not verified, the status will stay as PENDING_VERIFICATION, and next_action will appear in the response. For E-wallet, you need to render the redirect page to the customer in order to complete the authorization. Once finished, you will receive a webhook notification of payment_consent.verified.

When initiating a subsequent transaction using a stored credential

A. For subsequent Subscription and Autodebit (MIT) transactions API-MIT

  1. Create payment_intent API with the corresponding Customer ID
  2. Confirm payment_intent APIwith payment_consent_reference.id to request payment with reference to stored Payment Consent

B. For subsequent Oneclick (CIT) transactions: API-CIT

  1. Create payment_intents API with the corresponding Customer ID
  2. Query payment_consents API and payment_methods API (optional if no consent with card) with the corresponding Customer ID to render the list of customer’s payment consents they previously verified
  3. Confirm payment_intents APIwith payment_consent_reference.id to 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

Error CodeScenario
resource_not_foundcreate a payment consent with non-existing customer_id or payment_method_id; update a payment consent with non-existing payment_method_id
resource_not_foundconfirm a payment intent with non-existing payment_consent_id
resource_not_foundconfirm a payment intent with payment consent that is DISABLED
resource_not_foundconfirm a payment intent with payment consent of the status PENDING_VERIFICATION while its payment method requires the consent to be VERIFIED before this operation
resource_not_foundconfirm a payment intent with payment consent whose payment method has been DISABLED or EXPIRED
validation_errorconfirm a payment intent with payment consent without providing cvc while requires_cvc is true
currency_not_supportedconfirm a payment intent with payment consent whose currency is different from the intent currency
On this page