Billing Checkouts
A Billing Checkout manages the setup and lifecycle of an Airwallex-hosted customer checkout experience, enabling customers to confirm and pay for line items or set up payment details for future transactions.
We recommend creating a new Billing Checkout each time a customer initiates a purchase. After the customer successfully completes the checkout, resources such as Customer, Payment Source, and Subscription will be automatically created in the Billing Checkout object.
POST /api/v1/billing/billing_checkouts/createGET /api/v1/billing/billing_checkouts/{id}GET /api/v1/billing/billing_checkoutsPOST /api/v1/billing/billing_checkouts/{id}/updatePOST /api/v1/billing/billing_checkouts/{id}/cancel
Create a billing checkout
POST /api/v1/billing/billing_checkouts/create
Creates a Billing Checkout object.
The mode of the Billing Checkout object, can be one of:
SUBSCRIPTION: Set up subscriptions.
PAYMENT: Accept one-off payments.
SETUP: Collect payment details to charge your customers later.
Unique request ID specified by the merchant.
If set, the hosted checkout page displays a back button which allows customers to cancel the flow and be directed to this URL.
ID of the billing customer to reference the Billing Checkout. The customer's profile will be used to prefill the email, name, billing address and tax identification number during the checkout process. If provided, the customer can either choose a saved payment source for this checkout, or checkout a new payment method.
Required in SETUP mode.
The checkout currency in 3-letter ISO-4217 format. Required in SETUP mode.
The prefilled information of the customer. Only applicable when billing_customer_id is not provided.
Not applicable in SETUP mode.
The prefilled email of the customer.
If this field or a billing_customer_id with an email on file is provided, the email will be prefilled and will not be editable during checkout.
If neither is provided, Billing Checkout will prompt the customer to enter their email during the checkout process.
The prefilled name of the customer.
If this field or a billing_customer_id with a name on file is provided, the name will be prefilled and will not be editable during checkout.
If neither is provided, Billing Checkout will prompt the customer to enter their name during checkout.
Type of the billing customer, one of BUSINESS or INDIVIDUAL.
If not provided, an "I am purchasing as a business" checkbox will be displayed during checkout for the customer to self-select.
Provides configuration for the Billing Checkout to collect information from customers.
Controls whether the billing address will be collected during checkout.
AUTO: Billing address will only be collected when necessary. Specifically, when automatic tax is enabled, or tax_id is collected.REQUIRED: Billing address will always be collected. Defaults toAUTO.
Controls whether the tax ID will be collected for business customer during checkout. One of OPTIONAL_IF_SUPPORTED, DISABLED, REQUIRED_IF_SUPPORTED.
DISABLED: Tax id will not be collected.OPTIONAL_IF_SUPPORTED: Tax id will be optionally collected in the supported countries, by displaying a checkbox "I am purchasing as business".REQUIRED_IF_SUPPORTED: Tax id will always be collected if the country is in the supported list. Defaults toOPTIONAL_IF_SUPPORTED.
List of discounts to be applied to the subscription. Discounts of subscription items are applied before subscription discounts. Currently, only one element is supported.
Coupon to redeem into a discount for this resource. Only required when type = COUPON.
id of the Coupon object.
Specifies how to obtain the discount. One of: COUPON.
Whether automatic tax is enabled for this checkout. When enabled, the system attempts to calculate taxes for this checkout's invoice automatically. Defaults to false.
Configuration for the Airwallex-hosted completion page. Only applicable when ui_mode is HOSTED.
Whether to display the Airwallex-hosted completion page after checkout is completed and before the customer is redirected to success_url.
The settings of invoice to be passed to the invoice creation upon completion of the Billing Checkout in PAYMENT mode.
Number of days from invoice finalization until payment is due.
The tax rate between 0 and 100(%) to be applied to invoices to be generated. The tax will be exclusive. Defaults to 0.
Due date set by the merchant for this invoice, if any. Only one of days_until_due and due_at should be passed.
String used for merchants to share a custom message to their customers. Referenced as memo or invoice note in Webapp.
A set of key-value pairs that you can attach to this object for storing additional information.
ID of the legal entity to be used as billing entity. You can find this ID in the Airwallex web app > Settings. Required if you have more than 1 entity in your organisation.
A list of items the customer is purchasing. Required when the mode is SUBSCRIPTION or PAYMENT. Not applicable when the mode is SETUP.
For SUBSCRIPTION mode, all the line items must have a recurring Price.
For PAYMENT mode, all the line items must have a non-recurring Price.
List of discounts to be applied to the line items. Discounts of line items are applied before subscription or invoice discounts. Currently, only one element is supported.
Coupon to redeem into a discount for this resource. Only required when type = COUPON.
id of the Coupon object.
Specifies how to obtain the discount. One of: COUPON.
One-time price definition following the same schema as the Price resource. Exactly one of price_id or price is required.
Only applicable to PAYMENT mode.
Currency of the price (in 3-letter ISO-4217 format).
Price description. Used for internal classification and identification.
The fixed amount to be charged. Only required when the pricing model is FLAT.
Custom key-value pairs attached to the price.
Specify how to calculate the total billing amount when a quantity is provided. One of
FLAT: a fixed price.PER_UNIT: a fixed price per unit quantity. Defaults toPER_UNIT.
One-time product definition following the same schema as the Product. Exactly one of product_id or product is required.
Product name.
Product description. Used for internal classification and identification.
A set of string key-value pairs that you can attach to this object for storing additional information.
The tax category of the product.
Product unit.
ID of the Product object. Exactly one of product_id or product is required.
Whether the price includes tax. Defaults to false.
The amount to be charged per product unit. Only required when the pricing model is PER_UNIT.
ID of the Price object. Exactly one of price_id or price is required.
The quantity of the line item being purchased. Defaults to 1.
The effective tax percent of this line item.
ID of the linked payment account to collect payment. You can find this ID in the Airwallex web app > Settings > Account details, within the Account Information section. Required if you have more than 1 payment account in your organisation.
A code, in IETF language format, that determines the language and formatting displayed to customers on the checkout UI, and can be one of: AUTO, EN, ZH.
If set to AUTO the customer's browser locale is used.
A set of string key-value pairs that you can attach to this object for storing additional information.
Payment settings of this Billing Checkout.
Enables the option to "Request an invoice" for payment. After the customer confirms to pay with this option, the status of Billing Checkout will transit to COMPLETED, and an invoice will be generated. The invoice will inherit the payment_options of this Billing Checkout, and other configurations in invoice_data. Only applicable when mode is PAYMENT, and the type of the customer is BUSINESS
Settings for saving this payment method for future use.
Controls whether the payment method can be saved for future use. Possible values: ENABLED, DISABLED, or COLLECT_CONSENT.
ENABLED: The payment method will be saved for future use.
DISABLED: The payment method will not be saved.
COLLECT_CONSENT: The checkout UI asks the customer whether they want to save the payment method. Only applicable to cards.
Indicates who will use the saved payment source to trigger future payments. One of MERCHANT or CUSTOMER.
If MERCHANT, a Payment Source is created for future use. If CUSTOMER, the payment method is saved only with the payment provider.
Specify which payment methods to display on the hosted checkout page and set their display order. Only methods supported for the specified currency and the customer's country code will appear on the hosted checkout page.
Possible enum values when mode is SUBSCRIPTION: card, applepay, googlepay, alipaycn, alipayhk, dana, gcash, kakaopay, klarna, rabbit_line_pay, tng, truemoney.
Possible enum values when mode is PAYMENT: afterpay, airwallex_pay, alfamart, alipaycn, alipayhk, applepay, atome, au_pay, axs_kiosk, bancontact, bigc,bitpay, bkash, blik, boost, card, cash_app_pay, dana, doku_ewallet, dragonpay, duit_now, d_barai, enets, eps, esun, family_mart, fps, fpx, gcash, giropay, googlepay, go_pay, grabpay, hi_life, ideal, indomaret, jenius_pay, kakaopay, klarna, konbini, korean_local_card, laybuy, line_pay, linkaja, maxima, merpay, multibanco, mybank, narvesen, naver_pay, online_banking, ovo, p24, paybybankapp, payco, payeasy, payeasy_atm, payme, paypal, paypay, paypost, paysafecard, paysafecash, paysera, payu, pay_now, perlas_terminals, permatanet, permata_atm, pix, poli, prompt_pay, rabbit_line_pay, rakuten_pay, safetypay, samsung_pay, sam_kiosk, satispay, seven_eleven, shopee_pay, skrill, sofort, spei, tesco_lotus, tng, toss_pay, truemoney, trustly, twint, upi, venmo, verkkopankki, wechatpay, zip.
Possible enum values when mode is SETUP: card.
The settings of subscription to be passed to the subscription creation upon completion of the Billing Checkout in SUBSCRIPTION mode.
Number of days from invoice finalization until payment is due. Defaults to 0.
Invoices for the Subscription will be created using the specified settings.
Memo to be used for the invoices that are generated by this Subscription.
The tax rate between 0 and 100(%) to be applied to invoices to be generated. The tax will be exclusive. Defaults to 0.
The total duration of the subscription.
The number of period units.
Specifies billing duration. One of DAY, WEEK, MONTH or YEAR.
A set of string key-value pairs that you can attach to this object for storing additional information.
Time when the subscription started or scheduled to start. Defaults to start immediately after creation.
The end time of the trial if applicable.
The URL the customer will be directed to after the checkout completion.
The UI mode of the Billing Checkout, can be one of:
HOSTED: Customers complete the checkout on an Airwallex-hosted page.
EMBEDDED: Embed the checkout UI directly in your website or app.
ELEMENTS: Build a custom checkout UI using Airwallex Elements.
Defaults to HOSTED if not specified.
The automatic tax status of this checkout. One of
APPLIED: The automatic tax is applied.DISABLED: The automatic tax is disabled.LOCATION_NOT_SUPPORTED: Automatic tax calculation isn't supported in the customer's location.LOCATION_NOT_REGISTERED_BY_MERCHANT: The merchant isn't registered to collect tax in the customer's location.ADDRESS_INCOMPLETE: The customer address was insufficient or invalid to determine the correct tax.
If set, the hosted checkout page displays a back button which allows customers to cancel the flow and be directed to this URL.
ID of the associated billing customer. Billing Checkout will create a new Billing Customer based on information provided during the process, unless an existing billing customer ID was provided when the Billing Checkout was created.
Time when the Billing Checkout was cancelled.
The client secret used to initialize the Billing Checkout in EMBEDDED or ELEMENTS ui_mode. Only present when ui_mode is EMBEDDED or ELEMENTS.
Time when the Billing Checkout was completed.
Time when the Billing Checkout was created.
The checkout currency in 3-letter ISO-4217 format.
The prefilled information of the customer. Only applicable when billing_customer_id is not provided.
Not applicable in SETUP mode.
The prefilled email of the customer.
If this field or a billing_customer_id with an email on file is provided, the email will be prefilled and will not be editable during checkout.
If neither is provided, Billing Checkout will prompt the customer to enter their email during the checkout process.
The prefilled name of the customer.
If this field or a billing_customer_id with a name on file is provided, the name will be prefilled and will not be editable during checkout.
If neither is provided, Billing Checkout will prompt the customer to enter their name during checkout.
Type of the billing customer, one of BUSINESS or INDIVIDUAL.
If not provided, an "I am purchasing as a business" checkbox will be displayed during checkout for the customer to self-select.
Provides configuration for the Billing Checkout to collect information from customers.
Controls whether the billing address will be collected during checkout.
AUTO: Billing address will only be collected when necessary. Specifically, when automatic tax is enabled, or tax_id is collected.REQUIRED: Billing address will always be collected. Defaults toAUTO.
Controls whether the tax ID will be collected for business customer during checkout. One of OPTIONAL_IF_SUPPORTED, DISABLED, REQUIRED_IF_SUPPORTED.
DISABLED: Tax id will not be collected.OPTIONAL_IF_SUPPORTED: Tax id will be optionally collected in the supported countries, by displaying a checkbox "I am purchasing as business".REQUIRED_IF_SUPPORTED: Tax id will always be collected if the country is in the supported list. Defaults toOPTIONAL_IF_SUPPORTED.
List of discounts to be applied to the subscription. Discounts of subscription items are applied before subscription discounts. Currently, only one element is supported.
Specifies how to obtain the discount. One of: COUPON.
Coupon to redeem into a discount for this resource. Only required when type = COUPON.
id of the Coupon object.
Whether automatic tax is enabled for this checkout. When enabled, the system attempts to calculate taxes for this checkout's invoice automatically.
Time when the Billing Checkout expires.
Configuration for the Airwallex-hosted completion page. Only applicable when ui_mode is HOSTED.
Whether to display the Airwallex-hosted completion page after checkout is completed and before the customer is redirected to success_url.
ID of the Billing Checkout object.
The settings of invoice to be passed to the invoice creation upon completion of the Billing Checkout in PAYMENT mode.
Number of days from invoice finalization until payment is due.
The tax rate between 0 and 100(%) to be applied to invoices to be generated. The tax will be exclusive. Defaults to 0.
Due date set by the merchant for this invoice, if any.
String used for merchants to share a custom message to their customers. Referenced as memo or invoice note in Webapp.
A set of key-value pairs that you can attach to this object for storing additional information.
ID of the invoice for the Billing Checkout in PAYMENT mode. Only applicable when the Billing Checkout is in COMPLETED status
ID of the legal entity to be used as billing entity, which can be retrieved from the legal_entity_id field in the Retrieve account details API response.
A list of items the customer is purchasing.
List of discounts to be applied to the line items. Discounts of line items are applied before subscription or invoice discounts. Currently, only one element is supported.
Specifies how to obtain the discount. One of: COUPON.
Coupon to redeem into a discount for this resource. Only required when type = COUPON.
id of the Coupon object.
ID of the Price object.
The quantity of the line item being purchased.
The effective tax percent of this line item.
ID of the linked payment account to collect payment. You can find this ID in the Airwallex web app > Settings > Account details, within the Account Information section.
A code, in IETF language format, that determines the language and formatting displayed to customers on the checkout UI, and can be one of: AUTO, EN, ZH.
If set to AUTO the customer's browser locale is used.
A set of string key-value pairs that you can attach to this object for storing additional information.
The mode of the Billing Checkout object, can be one of:
SUBSCRIPTION: Set up subscriptions.
PAYMENT: Accept one-off payments.SETUP: Collect payment details to charge your customers later.
Payment settings of this Billing Checkout.
Enables the option to "Request an invoice" for payment. After the customer confirms to pay with this option, the status of Billing Checkout will transit to COMPLETED, and an invoice will be generated. The invoice will inherit the payment_options of this Billing Checkout, and other configurations in invoice_data. Only applicable when mode is PAYMENT, and the type of the customer is BUSINESS
Settings for saving this payment method for future use.
Controls whether the payment method can be saved for future use. Possible values: ENABLED, DISABLED, or COLLECT_CONSENT.
ENABLED: The payment method will be saved for future use.
DISABLED: The payment method will not be saved.
COLLECT_CONSENT: The checkout UI asks the customer whether they want to save the payment method.
Indicates who will use the saved payment source to trigger future payments. One of MERCHANT or CUSTOMER.
If MERCHANT, a Payment Source is created for future use. If CUSTOMER, the payment method is saved only with the payment provider.
Specify which payment methods to display on the hosted checkout page and set their display order. Only methods supported for the specified currency and the customer's country code will appear on the hosted checkout page.
Possible enum values when mode is SUBSCRIPTION: card, applepay, googlepay, alipaycn, alipayhk, dana, gcash, kakaopay, klarna, rabbit_line_pay, tng, truemoney.
Possible enum values when mode is PAYMENT: afterpay, airwallex_pay, alfamart, alipaycn, alipayhk, applepay, atome, au_pay, axs_kiosk, bancontact, bigc,bitpay, bkash, blik, boost, card, cash_app_pay, dana, doku_ewallet, dragonpay, duit_now, d_barai, enets, eps, esun, family_mart, fps, fpx, gcash, giropay, googlepay, go_pay, grabpay, hi_life, ideal, indomaret, jenius_pay, kakaopay, klarna, konbini, korean_local_card, laybuy, line_pay, linkaja, maxima, merpay, multibanco, mybank, narvesen, naver_pay, online_banking, ovo, p24, paybybankapp, payco, payeasy, payeasy_atm, payme, paypal, paypay, paypost, paysafecard, paysafecash, paysera, payu, pay_now, perlas_terminals, permatanet, permata_atm, pix, poli, prompt_pay, rabbit_line_pay, rakuten_pay, safetypay, samsung_pay, sam_kiosk, satispay, seven_eleven, shopee_pay, skrill, sofort, spei, tesco_lotus, tng, toss_pay, truemoney, trustly, twint, upi, venmo, verkkopankki, wechatpay, zip.
Possible enum values when mode is SETUP: card.
ID of the Payment Source created when the Billing Checkout is completed.
The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site, with payment status not confirmed.
The status of the Billing Checkout object, can be one of:
ACTIVE: The Billing Checkout is available for the customer to complete a purchase.
COMPLETED: The Billing Checkout has been completed.
CANCELLED: The Billing Checkout has been cancelled.
EXPIRED: The Billing Checkout has expired.
The status automatically changes from ACTIVE to EXPIRED after 1 hour if purchase has not been completed.
The settings of subscription to be passed to the subscription creation upon completion of the Billing Checkout in SUBSCRIPTION mode.
Number of days from invoice finalization until payment is due. Defaults to 0.
The billing cycle for recurring charges.
The number of period units between subscription billing cycles. For example, the billing cycle is bi-monthly if period=2 and period_unit=MONTH.
Specifies billing frequency. One of DAY, WEEK, MONTH or YEAR.
Invoices for the Subscription will be created using the specified settings.
Memo to be used for the invoices that are generated by this Subscription.
The tax rate between 0 and 100(%) to be applied to invoices to be generated. The tax will be exclusive. Defaults to 0.
The total duration of the subscription.
The number of period units.
Specifies billing duration. One of DAY, WEEK, MONTH or YEAR.
A set of string key-value pairs that you can attach to this object for storing additional information.
Time when the subscription started or scheduled to start. Defaults to start immediately after creation.
The end time of the trial if applicable.
ID of the subscription for the Billing Checkout in SUBSCRIPTION mode. Only applicable when the Billing Checkout is in COMPLETED status
The URL the customer will be directed to after the checkout completion.
The UI mode of the Billing Checkout, can be one of:
HOSTED: Customers complete the checkout on an Airwallex-hosted page.
EMBEDDED: Embed the checkout UI directly in your website or app.
ELEMENTS: Build a custom checkout UI using Airwallex Elements.
Time when the Billing Checkout was last updated.
The URL to the Billing Checkout. The value is only present when the status is ACTIVE.
| Error status | Description |
|---|---|
| 400 | Bad Request. Possible error codes: |
| 401 | Unauthorized. Possible error codes: |
| 500 | Server Error. Possible error codes: |
$curl --request POST \> --url 'https://api.airwallex.com/api/v1/billing/billing_checkouts/create' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json' \> --data '{> "back_url": "https://www.airwallex.com/back",> "billing_customer_id": "bcus_hkpd7fedfgb004apkvs",> "currency": "USD",> "customer_data": {> "email": "[email protected]",> "name": "John Doe",> "type": "INDIVIDUAL"> },> "customer_data_collection": {> "billing_address": "AUTO",> "tax_id": "OPTIONAL_IF_SUPPORTED"> },> "discounts": [> {> "coupon": {> "id": "coup_abc123"> },> "type": "COUPON"> }> ],> "enable_automatic_tax": false,> "hosted_completion_page": {> "display": true> },> "invoice_data": {> "days_until_due": 0,> "default_tax_percent": 10,> "due_at": "2026-01-01T10:15:30+0000",> "memo": "Thank you for your business!",> "metadata": {> "foo": "bar"> }> },> "legal_entity_id": "le_ib2DZgZJN72T7bObvNuMYQ",> "line_items": [> {> "discounts": [> {> "coupon": {> "id": "coup_abc123"> },> "type": "COUPON"> }> ],> "price": {> "currency": "USD",> "description": "Standard option: $10 / month.",> "pricing_model": "PER_UNIT",> "product": {> "description": "The license to use software in one month.",> "metadata": {> "foo": "bar"> },> "name": "Software License",> "tax_code": "pct_0504010000",> "unit": "month"> },> "product_id": "prd_hkpd1x2gbgazzvcd42w",> "tax_included": false> },> "price_id": "pri_hkpd7fedfgb004apkvs",> "quantity": 1,> "tax_percent": 5> }> ],> "linked_payment_account_id": "acct_ncI2nypPKSq2VXKxscAcg",> "locale": "AUTO",> "metadata": {> "foo": "bar"> },> "mode": "SUBSCRIPTION",> "payment_options": {> "pay_by_invoice_enabled": false,> "payment_method_save": {> "mode": "ENABLED",> "next_triggered_by": "MERCHANT"> },> "payment_method_types": [> "card",> "googlepay",> "applepay"> ]> },> "request_id": "ee939540-3203-4a2c-9172-89a566485dd9",> "subscription_data": {> "days_until_due": 0,> "default_invoice_template": {> "invoice_memo": "Thanks for your purchase."> },> "default_tax_percent": 10,> "duration": {> "period": 12,> "period_unit": "MONTH"> },> "metadata": {> "foo": "bar"> },> "starts_at": "2023-01-01T00:00:00+0000",> "trial_ends_at": "2023-02-01T00:00:00+0000"> },> "success_url": "https://www.airwallex.com/success",> "ui_mode": "HOSTED">}'
1{2 "automatic_tax_status": "APPLIED",3 "back_url": "https://www.airwallex.com/back",4 "billing_customer_id": "bcus_hkpd7fedfgb004apkvs",5 "cancelled_at": "2025-05-10T18:00:30+0000",6 "client_secret": "eyJhbGciOiJIUzI1NiJ9...",7 "completed_at": "2025-05-10T18:00:30+0000",8 "created_at": "2025-05-10T16:00:30+0000",9 "currency": "USD",10 "customer_data": {11 "email": "[email protected]",12 "name": "John Doe",13 "type": "INDIVIDUAL"14 },15 "customer_data_collection": {16 "billing_address": "AUTO",17 "tax_id": "OPTIONAL_IF_SUPPORTED"18 },19 "discounts": [20 {21 "coupon": {22 "id": "coup_abc123"23 },24 "type": "COUPON"25 }26 ],27 "enable_automatic_tax": true,28 "expires_at": "2025-05-12T16:00:30+0000",29 "hosted_completion_page": {30 "display": true31 },32 "id": "bco_sgstcdcpnh8sv3awiwo",33 "invoice_data": {34 "days_until_due": 0,35 "default_tax_percent": 10,36 "due_at": "2026-01-01T10:15:30+0000",37 "memo": "Thank you for your business!",38 "metadata": {39 "foo": "bar"40 }41 },42 "invoice_id": "inv_hkpd49cskgblns6iimw",43 "legal_entity_id": "le_ib2DZgZJN72T7bObvNuMYQ",44 "line_items": [45 {46 "discounts": [47 {48 "coupon": {49 "id": "coup_abc123"50 },51 "type": "COUPON"52 }53 ],54 "price_id": "pri_hkpd7fedfgb004apkvs",55 "quantity": 1,56 "tax_percent": 557 }58 ],59 "linked_payment_account_id": "acct_ncI2nypPKSq2VXKxscAcg",60 "locale": "AUTO",61 "metadata": {62 "foo": "bar"63 },64 "mode": "SUBSCRIPTION",65 "payment_options": {66 "pay_by_invoice_enabled": false,67 "payment_method_save": {68 "mode": "ENABLED",69 "next_triggered_by": "MERCHANT"70 },71 "payment_method_types": [72 "card",73 "googlepay",74 "applepay"75 ]76 },77 "payment_source_id": "psrc_d3Ds20ae5VihKs092",78 "return_url": "https://www.airwallex.com/return",79 "status": "ACTIVE",80 "subscription_data": {81 "days_until_due": 0,82 "default_invoice_template": {83 "invoice_memo": "Thanks for your purchase."84 },85 "default_tax_percent": 10,86 "duration": {87 "period": 12,88 "period_unit": "MONTH"89 },90 "metadata": {91 "foo": "bar"92 },93 "recurring": {94 "period": 1,95 "period_unit": "MONTH"96 },97 "starts_at": "2023-01-01T00:00:00+0000",98 "trial_ends_at": "2023-02-01T00:00:00+0000"99 },100 "subscription_id": "sub_hkpdkcmxdgazzq53jbk",101 "success_url": "https://www.airwallex.com/success",102 "ui_mode": "HOSTED",103 "updated_at": "2025-05-10T16:00:30+0000",104 "url": "https://checkout.airwallex.com/pay?s=jwt_token"105}
Retrieve a billing checkout
GET /api/v1/billing/billing_checkouts/{id}
Retrieves a Billing Checkout.
ID of the Billing Checkout object.
The automatic tax status of this checkout. One of
APPLIED: The automatic tax is applied.DISABLED: The automatic tax is disabled.LOCATION_NOT_SUPPORTED: Automatic tax calculation isn't supported in the customer's location.LOCATION_NOT_REGISTERED_BY_MERCHANT: The merchant isn't registered to collect tax in the customer's location.ADDRESS_INCOMPLETE: The customer address was insufficient or invalid to determine the correct tax.
If set, the hosted checkout page displays a back button which allows customers to cancel the flow and be directed to this URL.
ID of the associated billing customer. Billing Checkout will create a new Billing Customer based on information provided during the process, unless an existing billing customer ID was provided when the Billing Checkout was created.
Time when the Billing Checkout was cancelled.
The client secret used to initialize the Billing Checkout in EMBEDDED or ELEMENTS ui_mode. Only present when ui_mode is EMBEDDED or ELEMENTS.
Time when the Billing Checkout was completed.
Time when the Billing Checkout was created.
The checkout currency in 3-letter ISO-4217 format.
The prefilled information of the customer. Only applicable when billing_customer_id is not provided.
Not applicable in SETUP mode.
The prefilled email of the customer.
If this field or a billing_customer_id with an email on file is provided, the email will be prefilled and will not be editable during checkout.
If neither is provided, Billing Checkout will prompt the customer to enter their email during the checkout process.
The prefilled name of the customer.
If this field or a billing_customer_id with a name on file is provided, the name will be prefilled and will not be editable during checkout.
If neither is provided, Billing Checkout will prompt the customer to enter their name during checkout.
Type of the billing customer, one of BUSINESS or INDIVIDUAL.
If not provided, an "I am purchasing as a business" checkbox will be displayed during checkout for the customer to self-select.
Provides configuration for the Billing Checkout to collect information from customers.
Controls whether the billing address will be collected during checkout.
AUTO: Billing address will only be collected when necessary. Specifically, when automatic tax is enabled, or tax_id is collected.REQUIRED: Billing address will always be collected. Defaults toAUTO.
Controls whether the tax ID will be collected for business customer during checkout. One of OPTIONAL_IF_SUPPORTED, DISABLED, REQUIRED_IF_SUPPORTED.
DISABLED: Tax id will not be collected.OPTIONAL_IF_SUPPORTED: Tax id will be optionally collected in the supported countries, by displaying a checkbox "I am purchasing as business".REQUIRED_IF_SUPPORTED: Tax id will always be collected if the country is in the supported list. Defaults toOPTIONAL_IF_SUPPORTED.
List of discounts to be applied to the subscription. Discounts of subscription items are applied before subscription discounts. Currently, only one element is supported.
Specifies how to obtain the discount. One of: COUPON.
Coupon to redeem into a discount for this resource. Only required when type = COUPON.
id of the Coupon object.
Whether automatic tax is enabled for this checkout. When enabled, the system attempts to calculate taxes for this checkout's invoice automatically.
Time when the Billing Checkout expires.
Configuration for the Airwallex-hosted completion page. Only applicable when ui_mode is HOSTED.
Whether to display the Airwallex-hosted completion page after checkout is completed and before the customer is redirected to success_url.
ID of the Billing Checkout object.
The settings of invoice to be passed to the invoice creation upon completion of the Billing Checkout in PAYMENT mode.
Number of days from invoice finalization until payment is due.
The tax rate between 0 and 100(%) to be applied to invoices to be generated. The tax will be exclusive. Defaults to 0.
Due date set by the merchant for this invoice, if any.
String used for merchants to share a custom message to their customers. Referenced as memo or invoice note in Webapp.
A set of key-value pairs that you can attach to this object for storing additional information.
ID of the invoice for the Billing Checkout in PAYMENT mode. Only applicable when the Billing Checkout is in COMPLETED status
ID of the legal entity to be used as billing entity, which can be retrieved from the legal_entity_id field in the Retrieve account details API response.
A list of items the customer is purchasing.
List of discounts to be applied to the line items. Discounts of line items are applied before subscription or invoice discounts. Currently, only one element is supported.
Specifies how to obtain the discount. One of: COUPON.
Coupon to redeem into a discount for this resource. Only required when type = COUPON.
id of the Coupon object.
ID of the Price object.
The quantity of the line item being purchased.
The effective tax percent of this line item.
ID of the linked payment account to collect payment. You can find this ID in the Airwallex web app > Settings > Account details, within the Account Information section.
A code, in IETF language format, that determines the language and formatting displayed to customers on the checkout UI, and can be one of: AUTO, EN, ZH.
If set to AUTO the customer's browser locale is used.
A set of string key-value pairs that you can attach to this object for storing additional information.
The mode of the Billing Checkout object, can be one of:
SUBSCRIPTION: Set up subscriptions.
PAYMENT: Accept one-off payments.SETUP: Collect payment details to charge your customers later.
Payment settings of this Billing Checkout.
Enables the option to "Request an invoice" for payment. After the customer confirms to pay with this option, the status of Billing Checkout will transit to COMPLETED, and an invoice will be generated. The invoice will inherit the payment_options of this Billing Checkout, and other configurations in invoice_data. Only applicable when mode is PAYMENT, and the type of the customer is BUSINESS
Settings for saving this payment method for future use.
Controls whether the payment method can be saved for future use. Possible values: ENABLED, DISABLED, or COLLECT_CONSENT.
ENABLED: The payment method will be saved for future use.
DISABLED: The payment method will not be saved.
COLLECT_CONSENT: The checkout UI asks the customer whether they want to save the payment method.
Indicates who will use the saved payment source to trigger future payments. One of MERCHANT or CUSTOMER.
If MERCHANT, a Payment Source is created for future use. If CUSTOMER, the payment method is saved only with the payment provider.
Specify which payment methods to display on the hosted checkout page and set their display order. Only methods supported for the specified currency and the customer's country code will appear on the hosted checkout page.
Possible enum values when mode is SUBSCRIPTION: card, applepay, googlepay, alipaycn, alipayhk, dana, gcash, kakaopay, klarna, rabbit_line_pay, tng, truemoney.
Possible enum values when mode is PAYMENT: afterpay, airwallex_pay, alfamart, alipaycn, alipayhk, applepay, atome, au_pay, axs_kiosk, bancontact, bigc,bitpay, bkash, blik, boost, card, cash_app_pay, dana, doku_ewallet, dragonpay, duit_now, d_barai, enets, eps, esun, family_mart, fps, fpx, gcash, giropay, googlepay, go_pay, grabpay, hi_life, ideal, indomaret, jenius_pay, kakaopay, klarna, konbini, korean_local_card, laybuy, line_pay, linkaja, maxima, merpay, multibanco, mybank, narvesen, naver_pay, online_banking, ovo, p24, paybybankapp, payco, payeasy, payeasy_atm, payme, paypal, paypay, paypost, paysafecard, paysafecash, paysera, payu, pay_now, perlas_terminals, permatanet, permata_atm, pix, poli, prompt_pay, rabbit_line_pay, rakuten_pay, safetypay, samsung_pay, sam_kiosk, satispay, seven_eleven, shopee_pay, skrill, sofort, spei, tesco_lotus, tng, toss_pay, truemoney, trustly, twint, upi, venmo, verkkopankki, wechatpay, zip.
Possible enum values when mode is SETUP: card.
ID of the Payment Source created when the Billing Checkout is completed.
The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site, with payment status not confirmed.
The status of the Billing Checkout object, can be one of:
ACTIVE: The Billing Checkout is available for the customer to complete a purchase.
COMPLETED: The Billing Checkout has been completed.
CANCELLED: The Billing Checkout has been cancelled.
EXPIRED: The Billing Checkout has expired.
The status automatically changes from ACTIVE to EXPIRED after 1 hour if purchase has not been completed.
The settings of subscription to be passed to the subscription creation upon completion of the Billing Checkout in SUBSCRIPTION mode.
Number of days from invoice finalization until payment is due. Defaults to 0.
The billing cycle for recurring charges.
The number of period units between subscription billing cycles. For example, the billing cycle is bi-monthly if period=2 and period_unit=MONTH.
Specifies billing frequency. One of DAY, WEEK, MONTH or YEAR.
Invoices for the Subscription will be created using the specified settings.
Memo to be used for the invoices that are generated by this Subscription.
The tax rate between 0 and 100(%) to be applied to invoices to be generated. The tax will be exclusive. Defaults to 0.
The total duration of the subscription.
The number of period units.
Specifies billing duration. One of DAY, WEEK, MONTH or YEAR.
A set of string key-value pairs that you can attach to this object for storing additional information.
Time when the subscription started or scheduled to start. Defaults to start immediately after creation.
The end time of the trial if applicable.
ID of the subscription for the Billing Checkout in SUBSCRIPTION mode. Only applicable when the Billing Checkout is in COMPLETED status
The URL the customer will be directed to after the checkout completion.
The UI mode of the Billing Checkout, can be one of:
HOSTED: Customers complete the checkout on an Airwallex-hosted page.
EMBEDDED: Embed the checkout UI directly in your website or app.
ELEMENTS: Build a custom checkout UI using Airwallex Elements.
Time when the Billing Checkout was last updated.
The URL to the Billing Checkout. The value is only present when the status is ACTIVE.
| Error status | Description |
|---|---|
| 400 | Bad Request. Possible error codes: |
| 401 | Unauthorized. Possible error codes: |
| 404 | Not Found. Possible error codes: |
| 500 | Server Error. Possible error codes: |
$curl --request GET \> --url 'https://api.airwallex.com/api/v1/billing/billing_checkouts/billing_checkout_id' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
1{2 "automatic_tax_status": "APPLIED",3 "back_url": "https://www.airwallex.com/back",4 "billing_customer_id": "bcus_hkpd7fedfgb004apkvs",5 "cancelled_at": "2025-05-10T18:00:30+0000",6 "client_secret": "eyJhbGciOiJIUzI1NiJ9...",7 "completed_at": "2025-05-10T18:00:30+0000",8 "created_at": "2025-05-10T16:00:30+0000",9 "currency": "USD",10 "customer_data": {11 "email": "[email protected]",12 "name": "John Doe",13 "type": "INDIVIDUAL"14 },15 "customer_data_collection": {16 "billing_address": "AUTO",17 "tax_id": "OPTIONAL_IF_SUPPORTED"18 },19 "discounts": [20 {21 "coupon": {22 "id": "coup_abc123"23 },24 "type": "COUPON"25 }26 ],27 "enable_automatic_tax": true,28 "expires_at": "2025-05-12T16:00:30+0000",29 "hosted_completion_page": {30 "display": true31 },32 "id": "bco_sgstcdcpnh8sv3awiwo",33 "invoice_data": {34 "days_until_due": 0,35 "default_tax_percent": 10,36 "due_at": "2026-01-01T10:15:30+0000",37 "memo": "Thank you for your business!",38 "metadata": {39 "foo": "bar"40 }41 },42 "invoice_id": "inv_hkpd49cskgblns6iimw",43 "legal_entity_id": "le_ib2DZgZJN72T7bObvNuMYQ",44 "line_items": [45 {46 "discounts": [47 {48 "coupon": {49 "id": "coup_abc123"50 },51 "type": "COUPON"52 }53 ],54 "price_id": "pri_hkpd7fedfgb004apkvs",55 "quantity": 1,56 "tax_percent": 557 }58 ],59 "linked_payment_account_id": "acct_ncI2nypPKSq2VXKxscAcg",60 "locale": "AUTO",61 "metadata": {62 "foo": "bar"63 },64 "mode": "SUBSCRIPTION",65 "payment_options": {66 "pay_by_invoice_enabled": false,67 "payment_method_save": {68 "mode": "ENABLED",69 "next_triggered_by": "MERCHANT"70 },71 "payment_method_types": [72 "card",73 "googlepay",74 "applepay"75 ]76 },77 "payment_source_id": "psrc_d3Ds20ae5VihKs092",78 "return_url": "https://www.airwallex.com/return",79 "status": "ACTIVE",80 "subscription_data": {81 "days_until_due": 0,82 "default_invoice_template": {83 "invoice_memo": "Thanks for your purchase."84 },85 "default_tax_percent": 10,86 "duration": {87 "period": 12,88 "period_unit": "MONTH"89 },90 "metadata": {91 "foo": "bar"92 },93 "recurring": {94 "period": 1,95 "period_unit": "MONTH"96 },97 "starts_at": "2023-01-01T00:00:00+0000",98 "trial_ends_at": "2023-02-01T00:00:00+0000"99 },100 "subscription_id": "sub_hkpdkcmxdgazzq53jbk",101 "success_url": "https://www.airwallex.com/success",102 "ui_mode": "HOSTED",103 "updated_at": "2025-05-10T16:00:30+0000",104 "url": "https://checkout.airwallex.com/pay?s=jwt_token"105}
Get list of billing checkouts
GET /api/v1/billing/billing_checkouts
Retrieves a list of Billing Checkouts based on the query parameters.
The start date of created_at in ISO8601 format (inclusive).
A bookmark for use in pagination to retrieve either the next page or the previous page of results. You can fetch the value for this identifier from the response of the previous API call. To retrieve the next page of results, pass the value of page_after (if not null) from the response to a subsequent call. To retrieve the previous page of results, pass the value of page_before (if not null) from the response to a subsequent call.
Number of Billing Checkouts per page. Defaults to 20.
Status of the Billing Checkout.
ID of the subscription for the Billing Checkout upon completion.
The end date of created_at in ISO8601 format (exclusive).
Paged results.
The automatic tax status of this checkout. One of
APPLIED: The automatic tax is applied.DISABLED: The automatic tax is disabled.LOCATION_NOT_SUPPORTED: Automatic tax calculation isn't supported in the customer's location.LOCATION_NOT_REGISTERED_BY_MERCHANT: The merchant isn't registered to collect tax in the customer's location.ADDRESS_INCOMPLETE: The customer address was insufficient or invalid to determine the correct tax.
Time when the Billing Checkout was created.
List of discounts to be applied to the subscription. Discounts of subscription items are applied before subscription discounts. Currently, only one element is supported.
Specifies how to obtain the discount. One of: COUPON.
Coupon to redeem into a discount for this resource. Only required when type = COUPON.
id of the Coupon object.
Whether automatic tax is enabled for this checkout. When enabled, the system attempts to calculate taxes for this checkout's invoice automatically.
Time when the Billing Checkout expires.
ID of the Billing Checkout object.
A list of items the customer is purchasing.
List of discounts to be applied to the line items. Discounts of line items are applied before subscription or invoice discounts. Currently, only one element is supported.
Specifies how to obtain the discount. One of: COUPON.
Coupon to redeem into a discount for this resource. Only required when type = COUPON.
id of the Coupon object.
ID of the Price object.
The quantity of the line item being purchased.
The effective tax percent of this line item.
ID of the linked payment account to collect payment. You can find this ID in the Airwallex web app > Settings > Account details, within the Account Information section.
The mode of the Billing Checkout object, can be one of:
SUBSCRIPTION: Set up subscriptions.
PAYMENT: Accept one-off payments.SETUP: Collect payment details to charge your customers later.
The status of the Billing Checkout object, can be one of:
ACTIVE: The Billing Checkout is available for the customer to complete a purchase.
COMPLETED: The Billing Checkout has been completed.
CANCELLED: The Billing Checkout has been cancelled.
EXPIRED: The Billing Checkout has expired.
The status automatically changes from ACTIVE to EXPIRED after 1 hour if purchase has not been completed.
The UI mode of the Billing Checkout, can be one of:
HOSTED: Customers complete the checkout on an Airwallex-hosted page.
EMBEDDED: Embed the checkout UI directly in your website or app.
ELEMENTS: Build a custom checkout UI using Airwallex Elements.
Time when the Billing Checkout was last updated.
If set, the hosted checkout page displays a back button which allows customers to cancel the flow and be directed to this URL.
ID of the associated billing customer. Billing Checkout will create a new Billing Customer based on information provided during the process, unless an existing billing customer ID was provided when the Billing Checkout was created.
Time when the Billing Checkout was cancelled.
The client secret used to initialize the Billing Checkout in EMBEDDED or ELEMENTS ui_mode. Only present when ui_mode is EMBEDDED or ELEMENTS.
Time when the Billing Checkout was completed.
The checkout currency in 3-letter ISO-4217 format.
The prefilled information of the customer. Only applicable when billing_customer_id is not provided.
Not applicable in SETUP mode.
The prefilled email of the customer.
If this field or a billing_customer_id with an email on file is provided, the email will be prefilled and will not be editable during checkout.
If neither is provided, Billing Checkout will prompt the customer to enter their email during the checkout process.
The prefilled name of the customer.
If this field or a billing_customer_id with a name on file is provided, the name will be prefilled and will not be editable during checkout.
If neither is provided, Billing Checkout will prompt the customer to enter their name during checkout.
Type of the billing customer, one of BUSINESS or INDIVIDUAL.
If not provided, an "I am purchasing as a business" checkbox will be displayed during checkout for the customer to self-select.
Provides configuration for the Billing Checkout to collect information from customers.
Controls whether the billing address will be collected during checkout.
AUTO: Billing address will only be collected when necessary. Specifically, when automatic tax is enabled, or tax_id is collected.REQUIRED: Billing address will always be collected. Defaults toAUTO.
Controls whether the tax ID will be collected for business customer during checkout. One of OPTIONAL_IF_SUPPORTED, DISABLED, REQUIRED_IF_SUPPORTED.
DISABLED: Tax id will not be collected.OPTIONAL_IF_SUPPORTED: Tax id will be optionally collected in the supported countries, by displaying a checkbox "I am purchasing as business".REQUIRED_IF_SUPPORTED: Tax id will always be collected if the country is in the supported list. Defaults toOPTIONAL_IF_SUPPORTED.
Configuration for the Airwallex-hosted completion page. Only applicable when ui_mode is HOSTED.
Whether to display the Airwallex-hosted completion page after checkout is completed and before the customer is redirected to success_url.
The settings of invoice to be passed to the invoice creation upon completion of the Billing Checkout in PAYMENT mode.
Number of days from invoice finalization until payment is due.
The tax rate between 0 and 100(%) to be applied to invoices to be generated. The tax will be exclusive. Defaults to 0.
Due date set by the merchant for this invoice, if any.
String used for merchants to share a custom message to their customers. Referenced as memo or invoice note in Webapp.
A set of key-value pairs that you can attach to this object for storing additional information.
ID of the invoice for the Billing Checkout in PAYMENT mode. Only applicable when the Billing Checkout is in COMPLETED status
ID of the legal entity to be used as billing entity, which can be retrieved from the legal_entity_id field in the Retrieve account details API response.
A code, in IETF language format, that determines the language and formatting displayed to customers on the checkout UI, and can be one of: AUTO, EN, ZH.
If set to AUTO the customer's browser locale is used.
A set of string key-value pairs that you can attach to this object for storing additional information.
Payment settings of this Billing Checkout.
Enables the option to "Request an invoice" for payment. After the customer confirms to pay with this option, the status of Billing Checkout will transit to COMPLETED, and an invoice will be generated. The invoice will inherit the payment_options of this Billing Checkout, and other configurations in invoice_data. Only applicable when mode is PAYMENT, and the type of the customer is BUSINESS
Settings for saving this payment method for future use.
Controls whether the payment method can be saved for future use. Possible values: ENABLED, DISABLED, or COLLECT_CONSENT.
ENABLED: The payment method will be saved for future use.
DISABLED: The payment method will not be saved.
COLLECT_CONSENT: The checkout UI asks the customer whether they want to save the payment method.
Indicates who will use the saved payment source to trigger future payments. One of MERCHANT or CUSTOMER.
If MERCHANT, a Payment Source is created for future use. If CUSTOMER, the payment method is saved only with the payment provider.
Specify which payment methods to display on the hosted checkout page and set their display order. Only methods supported for the specified currency and the customer's country code will appear on the hosted checkout page.
Possible enum values when mode is SUBSCRIPTION: card, applepay, googlepay, alipaycn, alipayhk, dana, gcash, kakaopay, klarna, rabbit_line_pay, tng, truemoney.
Possible enum values when mode is PAYMENT: afterpay, airwallex_pay, alfamart, alipaycn, alipayhk, applepay, atome, au_pay, axs_kiosk, bancontact, bigc,bitpay, bkash, blik, boost, card, cash_app_pay, dana, doku_ewallet, dragonpay, duit_now, d_barai, enets, eps, esun, family_mart, fps, fpx, gcash, giropay, googlepay, go_pay, grabpay, hi_life, ideal, indomaret, jenius_pay, kakaopay, klarna, konbini, korean_local_card, laybuy, line_pay, linkaja, maxima, merpay, multibanco, mybank, narvesen, naver_pay, online_banking, ovo, p24, paybybankapp, payco, payeasy, payeasy_atm, payme, paypal, paypay, paypost, paysafecard, paysafecash, paysera, payu, pay_now, perlas_terminals, permatanet, permata_atm, pix, poli, prompt_pay, rabbit_line_pay, rakuten_pay, safetypay, samsung_pay, sam_kiosk, satispay, seven_eleven, shopee_pay, skrill, sofort, spei, tesco_lotus, tng, toss_pay, truemoney, trustly, twint, upi, venmo, verkkopankki, wechatpay, zip.
Possible enum values when mode is SETUP: card.
ID of the Payment Source created when the Billing Checkout is completed.
The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site, with payment status not confirmed.
The settings of subscription to be passed to the subscription creation upon completion of the Billing Checkout in SUBSCRIPTION mode.
Number of days from invoice finalization until payment is due. Defaults to 0.
The billing cycle for recurring charges.
The number of period units between subscription billing cycles. For example, the billing cycle is bi-monthly if period=2 and period_unit=MONTH.
Specifies billing frequency. One of DAY, WEEK, MONTH or YEAR.
Invoices for the Subscription will be created using the specified settings.
Memo to be used for the invoices that are generated by this Subscription.
The tax rate between 0 and 100(%) to be applied to invoices to be generated. The tax will be exclusive. Defaults to 0.
The total duration of the subscription.
The number of period units.
Specifies billing duration. One of DAY, WEEK, MONTH or YEAR.
A set of string key-value pairs that you can attach to this object for storing additional information.
Time when the subscription started or scheduled to start. Defaults to start immediately after creation.
The end time of the trial if applicable.
ID of the subscription for the Billing Checkout in SUBSCRIPTION mode. Only applicable when the Billing Checkout is in COMPLETED status
The URL the customer will be directed to after the checkout completion.
The URL to the Billing Checkout. The value is only present when the status is ACTIVE.
The page cursor used for searching after page.
The page cursor used for search before page.
| Error status | Description |
|---|---|
| 400 | Bad Request. Possible error codes: |
| 401 | Unauthorized. Possible error codes: |
| 500 | Server Error. Possible error codes: |
$curl --request GET \> --url 'https://api.airwallex.com/api/v1/billing/billing_checkouts' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
1{2 "items": [3 {4 "automatic_tax_status": "APPLIED",5 "back_url": "https://www.airwallex.com/back",6 "billing_customer_id": "bcus_hkpd7fedfgb004apkvs",7 "cancelled_at": "2025-05-10T18:00:30+0000",8 "client_secret": "eyJhbGciOiJIUzI1NiJ9...",9 "completed_at": "2025-05-10T18:00:30+0000",10 "created_at": "2025-05-10T16:00:30+0000",11 "currency": "USD",12 "customer_data": {13 "email": "[email protected]",14 "name": "John Doe",15 "type": "INDIVIDUAL"16 },17 "customer_data_collection": {18 "billing_address": "AUTO",19 "tax_id": "OPTIONAL_IF_SUPPORTED"20 },21 "discounts": [22 {23 "coupon": {24 "id": "coup_abc123"25 },26 "type": "COUPON"27 }28 ],29 "enable_automatic_tax": true,30 "expires_at": "2025-05-12T16:00:30+0000",31 "hosted_completion_page": {32 "display": true33 },34 "id": "bco_sgstcdcpnh8sv3awiwo",35 "invoice_data": {36 "days_until_due": 0,37 "default_tax_percent": 10,38 "due_at": "2026-01-01T10:15:30+0000",39 "memo": "Thank you for your business!",40 "metadata": {41 "foo": "bar"42 }43 },44 "invoice_id": "inv_hkpd49cskgblns6iimw",45 "legal_entity_id": "le_ib2DZgZJN72T7bObvNuMYQ",46 "line_items": [47 {48 "discounts": [49 {50 "coupon": {51 "id": "coup_abc123"52 },53 "type": "COUPON"54 }55 ],56 "price_id": "pri_hkpd7fedfgb004apkvs",57 "quantity": 1,58 "tax_percent": 559 }60 ],61 "linked_payment_account_id": "acct_ncI2nypPKSq2VXKxscAcg",62 "locale": "AUTO",63 "metadata": {64 "foo": "bar"65 },66 "mode": "SUBSCRIPTION",67 "payment_options": {68 "payment_method_save": {69 "mode": "ENABLED",70 "next_triggered_by": "MERCHANT"71 },72 "payment_method_types": [73 "card",74 "googlepay",75 "applepay"76 ]77 },78 "payment_source_id": "psrc_d3Ds20ae5VihKs092",79 "return_url": "https://www.airwallex.com/return",80 "status": "ACTIVE",81 "subscription_data": {82 "days_until_due": 0,83 "default_invoice_template": {84 "invoice_memo": "Thanks for your purchase."85 },86 "default_tax_percent": 10,87 "duration": {88 "period": 12,89 "period_unit": "MONTH"90 },91 "metadata": {92 "foo": "bar"93 },94 "recurring": {95 "period": 1,96 "period_unit": "MONTH"97 },98 "starts_at": "2023-01-01T00:00:00+0000",99 "trial_ends_at": "2023-02-01T00:00:00+0000"100 },101 "subscription_id": "sub_hkpdkcmxdgazzq53jbk",102 "success_url": "https://www.airwallex.com/success",103 "ui_mode": "HOSTED",104 "updated_at": "2025-05-10T16:00:30+0000",105 "url": "https://checkout.airwallex.com/pay?s=jwt_token"106 }107 ],108 "page_after": "<string>",109 "page_before": "<string>"110}
Update a billing checkout
POST /api/v1/billing/billing_checkouts/{id}/update
Updates a Billing Checkout object.
ID of the Billing Checkout
A set of string key-value pairs that you can attach to this object for storing additional information.
The automatic tax status of this checkout. One of
APPLIED: The automatic tax is applied.DISABLED: The automatic tax is disabled.LOCATION_NOT_SUPPORTED: Automatic tax calculation isn't supported in the customer's location.LOCATION_NOT_REGISTERED_BY_MERCHANT: The merchant isn't registered to collect tax in the customer's location.ADDRESS_INCOMPLETE: The customer address was insufficient or invalid to determine the correct tax.
If set, the hosted checkout page displays a back button which allows customers to cancel the flow and be directed to this URL.
ID of the associated billing customer. Billing Checkout will create a new Billing Customer based on information provided during the process, unless an existing billing customer ID was provided when the Billing Checkout was created.
Time when the Billing Checkout was cancelled.
The client secret used to initialize the Billing Checkout in EMBEDDED or ELEMENTS ui_mode. Only present when ui_mode is EMBEDDED or ELEMENTS.
Time when the Billing Checkout was completed.
Time when the Billing Checkout was created.
The checkout currency in 3-letter ISO-4217 format.
The prefilled information of the customer. Only applicable when billing_customer_id is not provided.
Not applicable in SETUP mode.
The prefilled email of the customer.
If this field or a billing_customer_id with an email on file is provided, the email will be prefilled and will not be editable during checkout.
If neither is provided, Billing Checkout will prompt the customer to enter their email during the checkout process.
The prefilled name of the customer.
If this field or a billing_customer_id with a name on file is provided, the name will be prefilled and will not be editable during checkout.
If neither is provided, Billing Checkout will prompt the customer to enter their name during checkout.
Type of the billing customer, one of BUSINESS or INDIVIDUAL.
If not provided, an "I am purchasing as a business" checkbox will be displayed during checkout for the customer to self-select.
Provides configuration for the Billing Checkout to collect information from customers.
Controls whether the billing address will be collected during checkout.
AUTO: Billing address will only be collected when necessary. Specifically, when automatic tax is enabled, or tax_id is collected.REQUIRED: Billing address will always be collected. Defaults toAUTO.
Controls whether the tax ID will be collected for business customer during checkout. One of OPTIONAL_IF_SUPPORTED, DISABLED, REQUIRED_IF_SUPPORTED.
DISABLED: Tax id will not be collected.OPTIONAL_IF_SUPPORTED: Tax id will be optionally collected in the supported countries, by displaying a checkbox "I am purchasing as business".REQUIRED_IF_SUPPORTED: Tax id will always be collected if the country is in the supported list. Defaults toOPTIONAL_IF_SUPPORTED.
List of discounts to be applied to the subscription. Discounts of subscription items are applied before subscription discounts. Currently, only one element is supported.
Specifies how to obtain the discount. One of: COUPON.
Coupon to redeem into a discount for this resource. Only required when type = COUPON.
id of the Coupon object.
Whether automatic tax is enabled for this checkout. When enabled, the system attempts to calculate taxes for this checkout's invoice automatically.
Time when the Billing Checkout expires.
Configuration for the Airwallex-hosted completion page. Only applicable when ui_mode is HOSTED.
Whether to display the Airwallex-hosted completion page after checkout is completed and before the customer is redirected to success_url.
ID of the Billing Checkout object.
The settings of invoice to be passed to the invoice creation upon completion of the Billing Checkout in PAYMENT mode.
Number of days from invoice finalization until payment is due.
The tax rate between 0 and 100(%) to be applied to invoices to be generated. The tax will be exclusive. Defaults to 0.
Due date set by the merchant for this invoice, if any.
String used for merchants to share a custom message to their customers. Referenced as memo or invoice note in Webapp.
A set of key-value pairs that you can attach to this object for storing additional information.
ID of the invoice for the Billing Checkout in PAYMENT mode. Only applicable when the Billing Checkout is in COMPLETED status
ID of the legal entity to be used as billing entity, which can be retrieved from the legal_entity_id field in the Retrieve account details API response.
A list of items the customer is purchasing.
List of discounts to be applied to the line items. Discounts of line items are applied before subscription or invoice discounts. Currently, only one element is supported.
Specifies how to obtain the discount. One of: COUPON.
Coupon to redeem into a discount for this resource. Only required when type = COUPON.
id of the Coupon object.
ID of the Price object.
The quantity of the line item being purchased.
The effective tax percent of this line item.
ID of the linked payment account to collect payment. You can find this ID in the Airwallex web app > Settings > Account details, within the Account Information section.
A code, in IETF language format, that determines the language and formatting displayed to customers on the checkout UI, and can be one of: AUTO, EN, ZH.
If set to AUTO the customer's browser locale is used.
A set of string key-value pairs that you can attach to this object for storing additional information.
The mode of the Billing Checkout object, can be one of:
SUBSCRIPTION: Set up subscriptions.
PAYMENT: Accept one-off payments.SETUP: Collect payment details to charge your customers later.
Payment settings of this Billing Checkout.
Enables the option to "Request an invoice" for payment. After the customer confirms to pay with this option, the status of Billing Checkout will transit to COMPLETED, and an invoice will be generated. The invoice will inherit the payment_options of this Billing Checkout, and other configurations in invoice_data. Only applicable when mode is PAYMENT, and the type of the customer is BUSINESS
Settings for saving this payment method for future use.
Controls whether the payment method can be saved for future use. Possible values: ENABLED, DISABLED, or COLLECT_CONSENT.
ENABLED: The payment method will be saved for future use.
DISABLED: The payment method will not be saved.
COLLECT_CONSENT: The checkout UI asks the customer whether they want to save the payment method.
Indicates who will use the saved payment source to trigger future payments. One of MERCHANT or CUSTOMER.
If MERCHANT, a Payment Source is created for future use. If CUSTOMER, the payment method is saved only with the payment provider.
Specify which payment methods to display on the hosted checkout page and set their display order. Only methods supported for the specified currency and the customer's country code will appear on the hosted checkout page.
Possible enum values when mode is SUBSCRIPTION: card, applepay, googlepay, alipaycn, alipayhk, dana, gcash, kakaopay, klarna, rabbit_line_pay, tng, truemoney.
Possible enum values when mode is PAYMENT: afterpay, airwallex_pay, alfamart, alipaycn, alipayhk, applepay, atome, au_pay, axs_kiosk, bancontact, bigc,bitpay, bkash, blik, boost, card, cash_app_pay, dana, doku_ewallet, dragonpay, duit_now, d_barai, enets, eps, esun, family_mart, fps, fpx, gcash, giropay, googlepay, go_pay, grabpay, hi_life, ideal, indomaret, jenius_pay, kakaopay, klarna, konbini, korean_local_card, laybuy, line_pay, linkaja, maxima, merpay, multibanco, mybank, narvesen, naver_pay, online_banking, ovo, p24, paybybankapp, payco, payeasy, payeasy_atm, payme, paypal, paypay, paypost, paysafecard, paysafecash, paysera, payu, pay_now, perlas_terminals, permatanet, permata_atm, pix, poli, prompt_pay, rabbit_line_pay, rakuten_pay, safetypay, samsung_pay, sam_kiosk, satispay, seven_eleven, shopee_pay, skrill, sofort, spei, tesco_lotus, tng, toss_pay, truemoney, trustly, twint, upi, venmo, verkkopankki, wechatpay, zip.
Possible enum values when mode is SETUP: card.
ID of the Payment Source created when the Billing Checkout is completed.
The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site, with payment status not confirmed.
The status of the Billing Checkout object, can be one of:
ACTIVE: The Billing Checkout is available for the customer to complete a purchase.
COMPLETED: The Billing Checkout has been completed.
CANCELLED: The Billing Checkout has been cancelled.
EXPIRED: The Billing Checkout has expired.
The status automatically changes from ACTIVE to EXPIRED after 1 hour if purchase has not been completed.
The settings of subscription to be passed to the subscription creation upon completion of the Billing Checkout in SUBSCRIPTION mode.
Number of days from invoice finalization until payment is due. Defaults to 0.
The billing cycle for recurring charges.
The number of period units between subscription billing cycles. For example, the billing cycle is bi-monthly if period=2 and period_unit=MONTH.
Specifies billing frequency. One of DAY, WEEK, MONTH or YEAR.
Invoices for the Subscription will be created using the specified settings.
Memo to be used for the invoices that are generated by this Subscription.
The tax rate between 0 and 100(%) to be applied to invoices to be generated. The tax will be exclusive. Defaults to 0.
The total duration of the subscription.
The number of period units.
Specifies billing duration. One of DAY, WEEK, MONTH or YEAR.
A set of string key-value pairs that you can attach to this object for storing additional information.
Time when the subscription started or scheduled to start. Defaults to start immediately after creation.
The end time of the trial if applicable.
ID of the subscription for the Billing Checkout in SUBSCRIPTION mode. Only applicable when the Billing Checkout is in COMPLETED status
The URL the customer will be directed to after the checkout completion.
The UI mode of the Billing Checkout, can be one of:
HOSTED: Customers complete the checkout on an Airwallex-hosted page.
EMBEDDED: Embed the checkout UI directly in your website or app.
ELEMENTS: Build a custom checkout UI using Airwallex Elements.
Time when the Billing Checkout was last updated.
The URL to the Billing Checkout. The value is only present when the status is ACTIVE.
| Error status | Description |
|---|---|
| 400 | Bad Request. Possible error codes: |
| 401 | Unauthorized. Possible error codes: |
| 404 | Not Found. Possible error codes: |
| 500 | Server Error. Possible error codes: |
$curl --request POST \> --url 'https://api.airwallex.com/api/v1/billing/billing_checkouts/billing_checkout_id/update' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json' \> --data '{> "metadata": {> "foo": "bar"> }>}'
1{2 "automatic_tax_status": "APPLIED",3 "back_url": "https://www.airwallex.com/back",4 "billing_customer_id": "bcus_hkpd7fedfgb004apkvs",5 "cancelled_at": "2025-05-10T18:00:30+0000",6 "client_secret": "eyJhbGciOiJIUzI1NiJ9...",7 "completed_at": "2025-05-10T18:00:30+0000",8 "created_at": "2025-05-10T16:00:30+0000",9 "currency": "USD",10 "customer_data": {11 "email": "[email protected]",12 "name": "John Doe",13 "type": "INDIVIDUAL"14 },15 "customer_data_collection": {16 "billing_address": "AUTO",17 "tax_id": "OPTIONAL_IF_SUPPORTED"18 },19 "discounts": [20 {21 "coupon": {22 "id": "coup_abc123"23 },24 "type": "COUPON"25 }26 ],27 "enable_automatic_tax": true,28 "expires_at": "2025-05-12T16:00:30+0000",29 "hosted_completion_page": {30 "display": true31 },32 "id": "bco_sgstcdcpnh8sv3awiwo",33 "invoice_data": {34 "days_until_due": 0,35 "default_tax_percent": 10,36 "due_at": "2026-01-01T10:15:30+0000",37 "memo": "Thank you for your business!",38 "metadata": {39 "foo": "bar"40 }41 },42 "invoice_id": "inv_hkpd49cskgblns6iimw",43 "legal_entity_id": "le_ib2DZgZJN72T7bObvNuMYQ",44 "line_items": [45 {46 "discounts": [47 {48 "coupon": {49 "id": "coup_abc123"50 },51 "type": "COUPON"52 }53 ],54 "price_id": "pri_hkpd7fedfgb004apkvs",55 "quantity": 1,56 "tax_percent": 557 }58 ],59 "linked_payment_account_id": "acct_ncI2nypPKSq2VXKxscAcg",60 "locale": "AUTO",61 "metadata": {62 "foo": "bar"63 },64 "mode": "SUBSCRIPTION",65 "payment_options": {66 "pay_by_invoice_enabled": false,67 "payment_method_save": {68 "mode": "ENABLED",69 "next_triggered_by": "MERCHANT"70 },71 "payment_method_types": [72 "card",73 "googlepay",74 "applepay"75 ]76 },77 "payment_source_id": "psrc_d3Ds20ae5VihKs092",78 "return_url": "https://www.airwallex.com/return",79 "status": "ACTIVE",80 "subscription_data": {81 "days_until_due": 0,82 "default_invoice_template": {83 "invoice_memo": "Thanks for your purchase."84 },85 "default_tax_percent": 10,86 "duration": {87 "period": 12,88 "period_unit": "MONTH"89 },90 "metadata": {91 "foo": "bar"92 },93 "recurring": {94 "period": 1,95 "period_unit": "MONTH"96 },97 "starts_at": "2023-01-01T00:00:00+0000",98 "trial_ends_at": "2023-02-01T00:00:00+0000"99 },100 "subscription_id": "sub_hkpdkcmxdgazzq53jbk",101 "success_url": "https://www.airwallex.com/success",102 "ui_mode": "HOSTED",103 "updated_at": "2025-05-10T16:00:30+0000",104 "url": "https://checkout.airwallex.com/pay?s=jwt_token"105}
Cancel a billing checkout
POST /api/v1/billing/billing_checkouts/{id}/cancel
A Billing Checkout in ACTIVE status can be cancelled. Once cancelled, the customer will no longer be able to complete the checkout and will see an error message when attempting to load it.
ID of the Billing Checkout
The automatic tax status of this checkout. One of
APPLIED: The automatic tax is applied.DISABLED: The automatic tax is disabled.LOCATION_NOT_SUPPORTED: Automatic tax calculation isn't supported in the customer's location.LOCATION_NOT_REGISTERED_BY_MERCHANT: The merchant isn't registered to collect tax in the customer's location.ADDRESS_INCOMPLETE: The customer address was insufficient or invalid to determine the correct tax.
If set, the hosted checkout page displays a back button which allows customers to cancel the flow and be directed to this URL.
ID of the associated billing customer. Billing Checkout will create a new Billing Customer based on information provided during the process, unless an existing billing customer ID was provided when the Billing Checkout was created.
Time when the Billing Checkout was cancelled.
The client secret used to initialize the Billing Checkout in EMBEDDED or ELEMENTS ui_mode. Only present when ui_mode is EMBEDDED or ELEMENTS.
Time when the Billing Checkout was completed.
Time when the Billing Checkout was created.
The checkout currency in 3-letter ISO-4217 format.
The prefilled information of the customer. Only applicable when billing_customer_id is not provided.
Not applicable in SETUP mode.
The prefilled email of the customer.
If this field or a billing_customer_id with an email on file is provided, the email will be prefilled and will not be editable during checkout.
If neither is provided, Billing Checkout will prompt the customer to enter their email during the checkout process.
The prefilled name of the customer.
If this field or a billing_customer_id with a name on file is provided, the name will be prefilled and will not be editable during checkout.
If neither is provided, Billing Checkout will prompt the customer to enter their name during checkout.
Type of the billing customer, one of BUSINESS or INDIVIDUAL.
If not provided, an "I am purchasing as a business" checkbox will be displayed during checkout for the customer to self-select.
Provides configuration for the Billing Checkout to collect information from customers.
Controls whether the billing address will be collected during checkout.
AUTO: Billing address will only be collected when necessary. Specifically, when automatic tax is enabled, or tax_id is collected.REQUIRED: Billing address will always be collected. Defaults toAUTO.
Controls whether the tax ID will be collected for business customer during checkout. One of OPTIONAL_IF_SUPPORTED, DISABLED, REQUIRED_IF_SUPPORTED.
DISABLED: Tax id will not be collected.OPTIONAL_IF_SUPPORTED: Tax id will be optionally collected in the supported countries, by displaying a checkbox "I am purchasing as business".REQUIRED_IF_SUPPORTED: Tax id will always be collected if the country is in the supported list. Defaults toOPTIONAL_IF_SUPPORTED.
List of discounts to be applied to the subscription. Discounts of subscription items are applied before subscription discounts. Currently, only one element is supported.
Specifies how to obtain the discount. One of: COUPON.
Coupon to redeem into a discount for this resource. Only required when type = COUPON.
id of the Coupon object.
Whether automatic tax is enabled for this checkout. When enabled, the system attempts to calculate taxes for this checkout's invoice automatically.
Time when the Billing Checkout expires.
Configuration for the Airwallex-hosted completion page. Only applicable when ui_mode is HOSTED.
Whether to display the Airwallex-hosted completion page after checkout is completed and before the customer is redirected to success_url.
ID of the Billing Checkout object.
The settings of invoice to be passed to the invoice creation upon completion of the Billing Checkout in PAYMENT mode.
Number of days from invoice finalization until payment is due.
The tax rate between 0 and 100(%) to be applied to invoices to be generated. The tax will be exclusive. Defaults to 0.
Due date set by the merchant for this invoice, if any.
String used for merchants to share a custom message to their customers. Referenced as memo or invoice note in Webapp.
A set of key-value pairs that you can attach to this object for storing additional information.
ID of the invoice for the Billing Checkout in PAYMENT mode. Only applicable when the Billing Checkout is in COMPLETED status
ID of the legal entity to be used as billing entity, which can be retrieved from the legal_entity_id field in the Retrieve account details API response.
A list of items the customer is purchasing.
List of discounts to be applied to the line items. Discounts of line items are applied before subscription or invoice discounts. Currently, only one element is supported.
Specifies how to obtain the discount. One of: COUPON.
Coupon to redeem into a discount for this resource. Only required when type = COUPON.
id of the Coupon object.
ID of the Price object.
The quantity of the line item being purchased.
The effective tax percent of this line item.
ID of the linked payment account to collect payment. You can find this ID in the Airwallex web app > Settings > Account details, within the Account Information section.
A code, in IETF language format, that determines the language and formatting displayed to customers on the checkout UI, and can be one of: AUTO, EN, ZH.
If set to AUTO the customer's browser locale is used.
A set of string key-value pairs that you can attach to this object for storing additional information.
The mode of the Billing Checkout object, can be one of:
SUBSCRIPTION: Set up subscriptions.
PAYMENT: Accept one-off payments.SETUP: Collect payment details to charge your customers later.
Payment settings of this Billing Checkout.
Enables the option to "Request an invoice" for payment. After the customer confirms to pay with this option, the status of Billing Checkout will transit to COMPLETED, and an invoice will be generated. The invoice will inherit the payment_options of this Billing Checkout, and other configurations in invoice_data. Only applicable when mode is PAYMENT, and the type of the customer is BUSINESS
Settings for saving this payment method for future use.
Controls whether the payment method can be saved for future use. Possible values: ENABLED, DISABLED, or COLLECT_CONSENT.
ENABLED: The payment method will be saved for future use.
DISABLED: The payment method will not be saved.
COLLECT_CONSENT: The checkout UI asks the customer whether they want to save the payment method.
Indicates who will use the saved payment source to trigger future payments. One of MERCHANT or CUSTOMER.
If MERCHANT, a Payment Source is created for future use. If CUSTOMER, the payment method is saved only with the payment provider.
Specify which payment methods to display on the hosted checkout page and set their display order. Only methods supported for the specified currency and the customer's country code will appear on the hosted checkout page.
Possible enum values when mode is SUBSCRIPTION: card, applepay, googlepay, alipaycn, alipayhk, dana, gcash, kakaopay, klarna, rabbit_line_pay, tng, truemoney.
Possible enum values when mode is PAYMENT: afterpay, airwallex_pay, alfamart, alipaycn, alipayhk, applepay, atome, au_pay, axs_kiosk, bancontact, bigc,bitpay, bkash, blik, boost, card, cash_app_pay, dana, doku_ewallet, dragonpay, duit_now, d_barai, enets, eps, esun, family_mart, fps, fpx, gcash, giropay, googlepay, go_pay, grabpay, hi_life, ideal, indomaret, jenius_pay, kakaopay, klarna, konbini, korean_local_card, laybuy, line_pay, linkaja, maxima, merpay, multibanco, mybank, narvesen, naver_pay, online_banking, ovo, p24, paybybankapp, payco, payeasy, payeasy_atm, payme, paypal, paypay, paypost, paysafecard, paysafecash, paysera, payu, pay_now, perlas_terminals, permatanet, permata_atm, pix, poli, prompt_pay, rabbit_line_pay, rakuten_pay, safetypay, samsung_pay, sam_kiosk, satispay, seven_eleven, shopee_pay, skrill, sofort, spei, tesco_lotus, tng, toss_pay, truemoney, trustly, twint, upi, venmo, verkkopankki, wechatpay, zip.
Possible enum values when mode is SETUP: card.
ID of the Payment Source created when the Billing Checkout is completed.
The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site, with payment status not confirmed.
The status of the Billing Checkout object, can be one of:
ACTIVE: The Billing Checkout is available for the customer to complete a purchase.
COMPLETED: The Billing Checkout has been completed.
CANCELLED: The Billing Checkout has been cancelled.
EXPIRED: The Billing Checkout has expired.
The status automatically changes from ACTIVE to EXPIRED after 1 hour if purchase has not been completed.
The settings of subscription to be passed to the subscription creation upon completion of the Billing Checkout in SUBSCRIPTION mode.
Number of days from invoice finalization until payment is due. Defaults to 0.
The billing cycle for recurring charges.
The number of period units between subscription billing cycles. For example, the billing cycle is bi-monthly if period=2 and period_unit=MONTH.
Specifies billing frequency. One of DAY, WEEK, MONTH or YEAR.
Invoices for the Subscription will be created using the specified settings.
Memo to be used for the invoices that are generated by this Subscription.
The tax rate between 0 and 100(%) to be applied to invoices to be generated. The tax will be exclusive. Defaults to 0.
The total duration of the subscription.
The number of period units.
Specifies billing duration. One of DAY, WEEK, MONTH or YEAR.
A set of string key-value pairs that you can attach to this object for storing additional information.
Time when the subscription started or scheduled to start. Defaults to start immediately after creation.
The end time of the trial if applicable.
ID of the subscription for the Billing Checkout in SUBSCRIPTION mode. Only applicable when the Billing Checkout is in COMPLETED status
The URL the customer will be directed to after the checkout completion.
The UI mode of the Billing Checkout, can be one of:
HOSTED: Customers complete the checkout on an Airwallex-hosted page.
EMBEDDED: Embed the checkout UI directly in your website or app.
ELEMENTS: Build a custom checkout UI using Airwallex Elements.
Time when the Billing Checkout was last updated.
The URL to the Billing Checkout. The value is only present when the status is ACTIVE.
| Error status | Description |
|---|---|
| 400 | Bad Request. Possible error codes: |
| 401 | Unauthorized. Possible error codes: |
| 404 | Not Found. Possible error codes: |
| 500 | Server Error. Possible error codes: |
$curl --request POST \> --url 'https://api.airwallex.com/api/v1/billing/billing_checkouts/billing_checkout_id/cancel' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
1{2 "automatic_tax_status": "APPLIED",3 "back_url": "https://www.airwallex.com/back",4 "billing_customer_id": "bcus_hkpd7fedfgb004apkvs",5 "cancelled_at": "2025-05-10T18:00:30+0000",6 "client_secret": "eyJhbGciOiJIUzI1NiJ9...",7 "completed_at": "2025-05-10T18:00:30+0000",8 "created_at": "2025-05-10T16:00:30+0000",9 "currency": "USD",10 "customer_data": {11 "email": "[email protected]",12 "name": "John Doe",13 "type": "INDIVIDUAL"14 },15 "customer_data_collection": {16 "billing_address": "AUTO",17 "tax_id": "OPTIONAL_IF_SUPPORTED"18 },19 "discounts": [20 {21 "coupon": {22 "id": "coup_abc123"23 },24 "type": "COUPON"25 }26 ],27 "enable_automatic_tax": true,28 "expires_at": "2025-05-12T16:00:30+0000",29 "hosted_completion_page": {30 "display": true31 },32 "id": "bco_sgstcdcpnh8sv3awiwo",33 "invoice_data": {34 "days_until_due": 0,35 "default_tax_percent": 10,36 "due_at": "2026-01-01T10:15:30+0000",37 "memo": "Thank you for your business!",38 "metadata": {39 "foo": "bar"40 }41 },42 "invoice_id": "inv_hkpd49cskgblns6iimw",43 "legal_entity_id": "le_ib2DZgZJN72T7bObvNuMYQ",44 "line_items": [45 {46 "discounts": [47 {48 "coupon": {49 "id": "coup_abc123"50 },51 "type": "COUPON"52 }53 ],54 "price_id": "pri_hkpd7fedfgb004apkvs",55 "quantity": 1,56 "tax_percent": 557 }58 ],59 "linked_payment_account_id": "acct_ncI2nypPKSq2VXKxscAcg",60 "locale": "AUTO",61 "metadata": {62 "foo": "bar"63 },64 "mode": "SUBSCRIPTION",65 "payment_options": {66 "pay_by_invoice_enabled": false,67 "payment_method_save": {68 "mode": "ENABLED",69 "next_triggered_by": "MERCHANT"70 },71 "payment_method_types": [72 "card",73 "googlepay",74 "applepay"75 ]76 },77 "payment_source_id": "psrc_d3Ds20ae5VihKs092",78 "return_url": "https://www.airwallex.com/return",79 "status": "ACTIVE",80 "subscription_data": {81 "days_until_due": 0,82 "default_invoice_template": {83 "invoice_memo": "Thanks for your purchase."84 },85 "default_tax_percent": 10,86 "duration": {87 "period": 12,88 "period_unit": "MONTH"89 },90 "metadata": {91 "foo": "bar"92 },93 "recurring": {94 "period": 1,95 "period_unit": "MONTH"96 },97 "starts_at": "2023-01-01T00:00:00+0000",98 "trial_ends_at": "2023-02-01T00:00:00+0000"99 },100 "subscription_id": "sub_hkpdkcmxdgazzq53jbk",101 "success_url": "https://www.airwallex.com/success",102 "ui_mode": "HOSTED",103 "updated_at": "2025-05-10T16:00:30+0000",104 "url": "https://checkout.airwallex.com/pay?s=jwt_token"105}