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 paymentsAirwallex platform overviewOnline payments modelPricing model
Integration options
Pay by Link
API Integration
Hosted Payment PageEmbedded ElementsDrop-in ElementMobile SDKNative APIPlugins

API Integration

In addition to the user interface in the webapp, Airwallex offers merchants an API solution for our Pay By Link product. Pay by Link enables merchants to issue payment links (URL or QR code) to share with their customers and accept payments very easily with a redirect to our secure hosted payment page. Merchants can customize the payment links, choose the amount, the currency, and the expiration date. Merchants can also choose to make the link reusable or one-off.

Below are the main steps to generate the payment links:

Workflow

Our API allows merchants to:

FeaturesPay By Link API
Create links
Update a payment link
Get the payments links the merchant created
Activate payment links
Deactivate payments links
Delete payment links
Get link information
Handle errors with relevant error codes

Our Pay By Link API is a typical REST API with JSON. To get started with our API, merchants will need their account ID provided at onboarding to proceed.

Overall Flow

PBL-overall flow

In order to start using the Merchant Links API, merchants will need to complete its configuration with the Merchant Config API first. The first two steps should be complete in webapp. To proceed with the link creation, merchants will need to call the Merchant Links API.

Merchant Config API

This API is used for configuring merchant information prior to using our payment link API. This API allows merchants to configure their profile: "email": "user@mail.com"

This is the initial step and doesn’t need to be repeated. However, merchants are welcome to change their settings, for instance, change and upload another logo with a different logo URL. Please see below the other fields that merchants will be required to add and then later change if necessary.

  • email specifies what email on the merchant side to send notifications about payments
  • notify controls if notifications are sent when a successful payment is completed
  • logoUrl what logo to use on Shopper page
  • name what merchant name to use on Shopper page
  • supportEmail email to reach out for support requests
  • supportPhone phone number to reach out for support requests

Below are the other available API calls:

Error Processing

In general, all API calls can be failed and in this case, merchants will get a specific HTTP status and error code and error message in the body.

Error codeError description
OTHER_ERRORsome other errors, it should contain trace-id in the message for debug
INPUT_MISSINGrequested input field is missing
INPUT_TOO_LONGrequested input field is too long
CODE_BAD_SYMBOLSrequested code had unsupported symbols
CODE_NOT_FOUNDrequested code not found
CODE_NOT_UNIQUErequested code not unique in the system
EMAIL_NOT_VALIDrequested shopper email is not valid or is too long
BAD_EXPIRYexpiry date in the past
ACTIVATION_FAILEDcan't activate link (current status not DEACTIVATED)
DEACTIVATION_FAILEDcan't deactivate link (current status not ACTIVE)
INTENT_CREATEDintent already created for one-time links
LINK_FORBIDDENlink belongs to another merchant
LINK_NOT_FOUNDlink not found
LINK_NOT_ACTIVElink not active
CONFIG_NOT_FOUNDmerchant config not found
CORE_FAILEDpayment core failed to create intent
CONFIG_CENTER_FAILEDconfig centre failed to provide merchant available currency
AMOUNT_WRONGrequested amount is wrong (less than min or other currency)
MERCHANT_NOT_ENABLED_PAmerchant config is not full in config-centre or no active PMPs configured
HEADER_MISSINGmissing required header
ARGUMENT_MISMATCHfailed to deserialize JSON from the body
On this page
  • Overall Flow
  • Merchant Config API
  • Merchant Links API
  • Send a PaymentLink
  • Error Processing