Integrate with Payment Links API
Create payment links at scale with the API and embed it into your sales processes.
Link the Payment Links API API to your internal systems for a payment link to be generated every time a new order comes through, a new invoice gets sent out, or whenever you email a new customer. You can automatically create links with the API that support the full feature set as the web app version.
Enjoy the same benefit of accepting payments via 30+ payments methods in any currency from anywhere in the world, as well as top tier fraud protection and 3D secure authentication.
For more information on how to create payment links with the web app, refer to the Payment Links page .
Step 1: Create a payment link
For fixed amount links (“I will enter the amount” links on the web app), create a payment link by specifying the
amount
,currency
,title
,reusable
fields and any additional optional fieldsFor flexible amount links (“My customer will enter the amount” links on the web app), create a payment link by specifying the
supported_currencies
,default_currency
,title
,reusable
fields and any additional optional fieldsEvery payment link requires your shopper to enter their name and email address before paying. If you want to collect additional information, you can specify that under the
collectable_shopper_info
object by setting any of themessage
,phone_number
,reference
,shipping_address
fields astrue
.Provide a smoother checkout experience to your repeat shoppers by pre-filling their personal information and allowing them to save payment methods for future checkouts. To do this, first create a Customer with their information using our Customers API API. Include that shopper’s
Customer_ID
when creating a one-time payment link via API. When your shopper accesses the link, they will see their information pre-filled from what’s saved in the Customer object. If they edit the pre-filled information, it will update back into the Customer object. When checking out, they can save cards on file and make payment on future payment links without re-entering their card details. Note: Make sure you are sending the payment link to the same shopper as indicated by theCustomer_ID
.
Step 3: Track payments
When customers complete a payment on a payment link, Airwallex sends a payment_intent.succeeded webhook that you can use for subsequent fulfillment and reconciliation purposes. See Notifications and Webhooks for more information.
Payment Links API automatically handles device fingerprinting to uniquely track and identify devices used for transacting on your shopping site, thereby increasing your protection from fraud.
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 code | Error description |
---|---|
configuration_error | Invalid request against merchant configuration. Please contact your account manager. |
internal_error | An internal error was encountered. Please try again later. |
invalid_status_for_operation | The $resource status $status is invalid for operation $operation . |
resource_not_found | The $resource with ID $id cannot be found. |
validation_error | {message varies by validation rules} |