Other checkout options
Embedded Elements, Payments Native API, and Mobile SDK integration options require additional API calls to build and manage subscriptions.
Build your subscriptions integration
On completion of a checkout flow using any integration options above, the customer’s payment details are captured in a verified Payment Consent API object.
Follow these steps to create a subscription with the customer’s payment details you collected through the checkout flow.
Step 1: Create a Billing customer
Refer to Create Billing customer to create and manage a billing customer.
Step 2: Create a payment source
To start a subscription, you must first create a Payment source API object as a funding instrument that can be used to pay for invoices. You will need to pass the following fields in Create a payment source API request:
external_id
: The ID of a verified Payment Consent.linked_payment_account_id
: ID of your Airwallex account that you want to use to collect payment. You can find this ID in the Airwallex web app > Settings > Account details, within the Account Information section.
Step 3: Create a subscription
Call Create a subscription API with the following fields:
billing_customer_id
: Provide the ID of the billing customer created with Create a Billing Customer API from step 1.collection_method
: Set toAUTO_CHARGE
.linked_payment_account_id
: ID of your Airwallex account that you want to use to collect payment. You can find this ID in the Airwallex web app > Account > Account details, within the Account Information section.payment_source_id
: Provide the ID of the billing customer created with Create a payment source API from step 2.
Refer to Subscriptions for detailed information on how to create and manage subscriptions.