Payment Links via API
Create payment links at scale with the API and embed it into your sales processes.
Integrate Payment Links API API with your 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.
Create a payment link
Call Create a Payment Link API and specify the required fields depending on your payment scenario.
Fixed amount payment links
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 fields.
Flexible amount payment links
For 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 fields.
Additional shopper information
Every 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 the message
, phone_number
, reference
, shipping_address
fields as true
.
Pre-filled shopper information
You can 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,
- 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 the 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 the customer_id
.
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 Payments 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.
Manage payment links
You can perform the following actions on payment links using the Payment Link APIs.
- Update the details of an existing payment link using Update a PaymentLink API.
- Activate API or deactivate API a payment link. Note that by default payment links are activated.
- Retrieve payment link details and status anytime using Retrieve a PaymentLink API.
- Retrieve the list of payment links you've created using Get list of PaymentLinks API.
Troubleshooting
Some common error scenarios you might encounter are described below.
Error code | Error description |
---|---|
configuration_error | Invalid request against merchant configuration. Please contact your Airwallex Account Manager. |
internal_error | An internal error occurred. 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} |