Airwallex logo

Integrating with Airwallex Merchant of Record

Copy for LLMView as Markdown

Your integration still starts from creating a PaymentIntent API and redirecting to Hosted Payment Page (HPP). For more information, see the HPP guest checkout guide. The main change is the request payload on that PaymentIntent.

Before you get started

During your onboarding process to Airwallex, you will configure the following MoR settings:

  1. Which shopper countries you would like Airwallex to act as your MoR in: you can choose applicable customer countries if you'd like to selectively use Airwallex's MoR services. For shoppers with billing country outside of the selection, you will be the Merchant of Record and be responsible for sales tax.
  2. Price settings: whether the price you set is inclusive or exclusive of sales tax.

How it differs from standard Hosted Payment Page

Compared to the standard HPP guest checkout integration, MoR introduces:

  • Additional required fields: Email, billing address, and product-level details become mandatory for an MoR transaction.
    • Email and billing address will be provided by the shopper on our hosted payment page.
    • Product-level details are provided by you.
  • Controlled fields: In MoR mode, any information you share on the shopper's billing address will be discarded and re-collected on our hosted payment page given Airwallex is the merchant of record and must validate shopper billing addresses.
  • Payment methods: Shoppers will be able to pay with any MoR-supported payment methods that are relevant to their country and currency.

New payload fields (guest checkout)

Call Create a PaymentIntent API with the required fields. Learn more about PaymentIntents API.

FieldTypeRequiredDescription
order.productsarrayYesArray of product objects describing what is being sold. Must contain at least one item.
order.products[].namestringYesHuman-readable product name (for example, "EBOOK 1"). Used in receipts and reporting.
order.products[].codestringYesYour internal product or SKU code (for example, "SKU12345"). Helpful for reconciliation.
order.products[].quantityintegerYesNumber of units sold for this product. Must be a positive integer.
order.products[].unit_pricenumberYesPer-unit price for the product, in the same currency as the PaymentIntent currency (for example, "45" for SGD 45).
order.products[].tax_category_idalphanumericYesProduct tax category used by Airwallex to determine applicable sales tax (for example, "pct_0504020000"). Supported categories are listed in the tax categories reference.
order.products[].descstringYesProduct description.

API payload examples

Shell
Example request
Create a PaymentIntent
1curl -X POST https://api-demo.airwallex.com/api/v1/pa/payment_intents/create \
2 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \
3 -H 'Content-Type: application/json' \
4 -d '{
5 "request_id": "45d1c40f-c8c9-479a-b1ce-0ccdf431b7e3",
6 "amount": "45",
7 "email": "[email protected]",
8 "currency": "SGD",
9 "merchant_order_id": "839882d0-381c-41df-892d-5e720c27d519",
10 "return_url": "https://www.example.com/checkout/complete",
11 "descriptor": "YourBusiness",
12 "order": {
13 "products": [
14 {
15 "code": "SKU001",
16 "name": "AI Chatbot",
17 "quantity": 1,
18 "unit_price": 20,
19 "desc": "AI chatbot subscription",
20 "tax_category_id": "pct_0504020000"
21 },
22 {
23 "code": "SKU002",
24 "name": "AI Customer Support Tool",
25 "quantity": 1,
26 "unit_price": 25,
27 "desc": "AI agent for customer support",
28 "tax_category_id": "pct_0504020000"
29 }
30 ]
31 }
32}'
JSON
Example response
Create a PaymentIntent
1{
2 "id": "int_sgstt5ndghd2bzo7j9j",
3 "request_id": "45d1c40f-c8c9-479a-b1ce-0ccdf431b7e3",
4 "amount": 45,
5 "currency": "SGD",
6 "merchant_order_id": "839882d0-381c-41df-892d-5e720c27d519",
7 "order": {
8 "products": [
9 {
10 "code": "SKU001",
11 "name": "AI Chatbot",
12 "quantity": 1,
13 "unit_price": 20,
14 "desc": "AI chatbot subscription",
15 "tax_category_id": "pct_0504020000"
16 },
17 {
18 "code": "SKU002",
19 "name": "AI Customer Support Tool",
20 "quantity": 1,
21 "unit_price": 25,
22 "desc": "AI agent for customer support",
23 "tax_category_id": "pct_0504020000"
24 }
25 ]
26 },
27 "descriptor": "AWX*YourBusiness",
28 "status": "REQUIRES_PAYMENT_METHOD",
29 "captured_amount": 0,
30 "available_payment_method_types": [
31 "card",
32 "applepay",
33 "googlepay"
34 ],
35 "client_secret": "eyJ...your_client_secret",
36 "return_url": "https://www.example.com/checkout/complete",
37 "mor_enabled": true,
38 "original_amount": 45,
39 "original_currency": "SGD"
40}
Was this page helpful?