Sample integrations
Bill payments
A common use case is for accounting or accounts payables management software to connect to an Airwallex account to execute bill payments. Customers who upload bills to your platform, run through an approval process, and ultimately want to execute a payout to a vendor can do so easily through an integration with Airwallex, saving them from having to re-enter vendor payment details and manually execute payouts on the Airwallex web app.
To build such an integration, you will need the following OAuth Scopes:
r:awx_action:settings.account_details_view
r:awx_action:balances_view
w:awx_action:contact_management_edit
w:awx_action:transfers_edit
To enable bill payments:
- Check that the customer has sufficient funds in their account using the GET /api/v1/balances/current API endpoint
- Create a Beneficiary for the Vendor with their payment details (e.g. bank account numbers), if you have not previously created one. Beneficiary records on Airwallex can be re-used across multiple Payouts. Call POST /api/v1/beneficiaries/create API to do this — note that the fields required to create a Beneficiary vary significantly across regions and destination bank account types, so you can use the POST /api/v1/beneficiary_api_schemas/generate API endpoint to obtain the correct schema for a given region and destination bank account type combination.
- Once you have a valid Beneficiary, create the Payout with the amount of the bill to be paid by calling POST /api/v1/payments/create API
- Sometimes the Payout may be subject to additional review, in which case the status of the Payout will not be immediately successful. To obtain the most up-to-date status of the Payout, call GET /api/v1/payments/{payment_id} API with the Payout ID from the previous step.
Invoicing and online payments
Another common use case is allowing merchants or businesses to issue invoices and receive payments from their customers around the world via payment links. Airwallex supports payment methods ranging from international cards to popular local payment methods.
To enable payment acceptance via payments link, you will need the following OAuth Scopes:
r:awx_action:payment_links_view
w:awx_action:payment_links_edit
To generate a payment link for your invoices:
- Create a payment by calling POST /api/v1/pa/payment_links/create API. Our payment link supports two pricing options: fixed pricing where customer must pay the exact amount in the given currency and flexible payment where customer can pay in any of the supported currencies
- Once a payment link is created, you can call POST /api/v1/pa/payment_links/{id}/notify_shopper API to have the payment link emailed to a specified email address.
- To track payments, Airwallex sends a payment_intent.succeeded webhook that you can use for subsequent fulfillment and reconciliation purposes. Refer to the Notifications and Workflow Automation below for more information on setting up webhooks.
- Check the status of the PaymentIntent by calling the GET /api/v1/pa/payment_intents/{id} API