Distribute Pay Link
It is possible to send a Pay Link to a customer. This enables customers to receive a ready-to-pay checkout session where they can finalize the purchase on their own device by identifying themselves and selecting a payment option
After the customer has received the Pay Link, the rest of the flow will be the same as for a regular Checkout session i.e. the notification callback to your system will be performed once the purchase is successful and if you have implemented the validate call it will be performed as usual.
The customer will get a text message similar to this:
To customize the text sent to the customer, please Contact Walley Merchant Services for configuration.
Distribute Pay Link Request​
To distribute a Pay Link you must first create the Checkout session as you normally do by following the Basic Steps here
Once you have created a Checkout session it can be distributed to an end customer by issuing a POST request as per below:
- Request
- Response
POST /checkouts/1eec44b5-66d3-4058-a31f-3444229fb727/paylink HTTP/1.1
Host: api.uat.walleydev.com // (Please note! Different hostname in production)
Authorization: Bearer bXlVc2VybmFtZTpmN2E1ODA4MGQzZTk0M2VmNWYyMTZlMDE...
Content-Type: application/json
{
"destination": {
"mobilePhoneNumber": "0730481277"
}
}
{
"id": "f5f4e86d-95b1-4c1a-8ad0-1d5907236bd7",
"data": null,
"error": null
}
The request body should contain a json object with the receivers mobile telephone number.
Currently the only distribution type available is by mobile phone number.
Request Properties​
Request headers
Header | Required | Explanation |
---|---|---|
Authorization | Yes | Instructions on how to generate the authorization header value can be found here. |
Request properties
Property | Required | Explanation |
---|---|---|
destination.mobilePhoneNumber | Yes | The recepients mobile phone number. Supports foreign phone numbers if country prefix is added. If no country prefix is supplied, the current countries prefix will automatically be added, i.e. +46730 and 0730 are both accepted as start of a valid phone number in Sweden. |
Error responses​
Error code | Error Reason | Cause |
---|---|---|
400 | Validation_Error | The request contains properties with invalid values. Details are provided in the response body. |
503 | Could not notify customer | The service provider to push a pay link returned an error or was unavailable. |