PayByLink

Pay By Link Integration Guide

Pay by Link is a product where merchants can generate a payment link for their customers to pay using the link. The payment link takes the shoppers to a secure hosted payment page where shoppers can pay with their preferred payment method. The page works across different devices and can be customized with brand name and logo.


How it works

There are just three simple steps required to integrate:

Generate the payment link

Send the request parameters server-to-server to generate the payment link.

Distribute the link to the customer

Send the link to the customer via different modes - SMS, Email etc.

Get the payment status

Find out if the payment was successful.


Optional integration steps

The status of the payment link session and the link distribution can be checked at any time:

Get the payment link status

Find out the status of the payment link.

Get the status of the SMS

Find out if the SMS distribution was successful.

Deactivate the payment link

Deactivate the created payment link.


Basic workflow

1. Prepare the checkout and generate the payment link

First, perform a server-to-server POST request to prepare the checkout with the required data, including the order type, amount and currency. Additionally you can send brand information and logo through the layout parameter to customize the payment page.
The response to a successful request is a JSON string with an link parameter, which needs to be sent to the shopper. Using this link, the shopper will be able to perform the payment.

Please note that for a HTTP POST request all the parameters are expected to go into the message body and not into the URL.
For a full list of parameters that can be sent in Step 1, please see the API Reference. Additional customization options can be enabled by using the Pay By Link API Reference.

2. Send the link to the shopper

via Email, QR code

Collect the link from the response and send it to the shopper.

To see the payment page, click below.

Try it Out

via SMS

The payment link generated in Step 1 needs to be shared with the shopper. This can be done via means like SMS.

3. Get the payment status

Once the payment has been processed, the customer is redirected to your shopperResultUrl along with parameters id, the identifier of the payment page and chekoutId, the identifier of the checkout session being used.


Then, to get the status of the payment, you should make a GET request to the baseUrl + resourcePath, including your authentication parameters.

Example of a resourcePath:

resourcePath=paybylink/v1/{id}/checkouts/{checkoutId}/payment

Optional integration steps

4. Get the payment link status

To get the status of the payment link, you should make a GET request to the baseUrl + resourcePath, including the id of the payment link and your authentication parameters. The id of the payment link can be obtained from the response of the create checkout call done in Step 1.

Example of a resourcePath:

resourcePath=/paybylink/v1/{id}

5. Get the status of the SMS

To get the status of the SMS distribution, you should make a GET request to the baseUrl + resourcePath, including the id of the payment link and your authentication parameters. The id of the payment link can be obtained from the response of the create checkout call done in Step 1.

resourcePath=/paybylink/v1/{id}/sms/status
Example:

Once created, a payment link may be deleted using HTTP DELETE method using id of the payment link The id of the payment link can be obtained from the response of the create checkout call done in Step 1.

resourcePath=/paybylink/v1/{id}
Example: