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.


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 and the Pay By Link API Reference.

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

The payment link generated in Step 1 needs to be shared with the shopper. This can be done via means like SMS. The link can be sent to as part of the smsText attribute as below

3. Get the payment status

Once the payment has been processed, the customer is redirected to your shopperResultUrl along with a GET parameter resourcePath.

Important: The baseUrl must end in a "/", e.g. "https://eu-test.oppwa.com/".

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=/v1/checkouts/{checkoutId}/payment

Not that once a status response is successful, the checkout identifier can't be used anymore. In this case the Transaction Reports endpoint can be used to get the transaction status using the payment id.


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: