This guide focuses on the steps needed to create a unique payment link, including initiating the payment, redirecting the customer, and checking the status. We also show you how to use a webhook to keep current with processed paylinks and how to edit a payment link if you need to change its properties.
For more information on Payment Links, including use cases, see our Overview.
Before starting the steps in this guide, you must do the following:
In this step, we create a unique payment link using the Create Link request. You can include various data elements specific to each link request, such as product information, price, number of times it can be paid, notification type and destination, and a link expiration date. The Create Link call also retrieves some necessary information to facilitate the redirect and authentication of the customer.
For information on API methods and request/response data, see Links in API Explorer.
For information on API methods and request/response data, see Links in the API Explorer.
Once the link is created, the customer must be redirected using the URL returned in the Create Payment Links response to facilitate authentication and authorization. You can use a simple JavaScript redirect or HTTP GET (302 redirect).
For information on API methods and request/response data, see Links in API Explorer.
In this example, we redirect the customer to the URL using JavaScript.
To keep your systems up to date with all of the payments that were processed with Payment Links, you can use a webhook notification. This can be set using the status_url field when creating the Payment Links.
Once the customer completes the transaction, they are redirected back to your site based on transaction success/failure using the URLs specified in the Create Link request.
The TRN_ID that is passed in the webhook notification body should be used to check the status of the transaction before displaying a successful or failed transaction message to the customer and updating your systems.
For information on API methods and request/response data, see GET Transaction in the API Explorer.
You can cancel a payment link when you no longer want customers to use it. For example, you may want to cancel a link if the item is no longer available, the offer has expired, the price has changed, or you have decided to stop accepting payments through that link.
Here is an example, to cancel the link.
To get a deeper understanding of this product, we recommend that you use our provided integration references for both API and SDK integrations. For the full detailed API specification, see the API Explorer.
Generate an access token.
Create and retrieve payment links.
Add server-side or client-side code to your integration.
Our Payment Links solution is available for testing in our free Sandbox environment for registered users of this developer portal. Use our resources below to start testing different scenarios.
Test different transaction outcomes with simulated cards or banks.
View, import, or fork our API collection in Postman.
View successful responses, HTTP status codes, action response data, and errors.
Starter kit for payment integrations.
Guide for Payment Links integration.
Explore more functionality to enrich your application or website. Below are value-added services you can enable for Payment Links.