Payment links can be requested from either the Sandbox or Production environments. We recommend starting with Sandbox, where you can choose one of the model or mock banks and test the end-to-end process without making real payments:
Authentication
Pay by Link uses Volt’s REST API. See the authentication section of our developer documentation for details on how to obtain a token to access the Pay by Link endpoint.
Location
- Sandbox
- Production
POST https://api.sandbox.volt.io/pay-by-link
POST https://api.volt.io/pay-by-link
The above endpoint is based on the v2/payments endpoint. If you have already integrated Gateway, you should expect it to work the same way. The only difference is that you don’t need to redirect the shopper anywhere; checkoutUrl
is your payment link.
Request body
This endpoint takes exactly the same request structure as Request payment – Request body | Volt Developer Hub. Please refer to this section of developer documentation for further information.
{
"currencyCode": "EUR",
"amount": "100",
"type": "BILL",
"uniqueReference": "YourUniqueReference",
"payer": {
"reference": "payerreference"
},
"validityPeriod": 1440
}
Validity period of links
You can set a custom Pay by Link validity period by using the optional validityPeriod
parameter and supplying a value in minutes. By default, links generated by the pay-by-link endpoint are valid for the maximum allowable period of 30 days by default (equivalent to 43,200 minutes). This is different to regular payments generated using the v2/payments endpoint, which are valid for 30 minutes.
Minimum validity period
The minimum validity periods we recommend are 1 min for Pix payments in Brazil and 30 minutes for Open Banking payments in the EU or UK.
Example successful response
{
"id": "d70cf67a-a4b2-449e-af9b-572e03609917",
"checkoutUrl": "http://checkout.rc.volt.io/d70cf67a-a4b2-449e-af9b-572e03609917?auth=jwtToken"
}
The response contains two attributes:
id |
This is a UUID we’ve generated for your payment request |
checkoutUrl |
This is the link to the checkout that should be passed to your customer |
Status codes
Other status codes you could receive, for unsuccessful requests, are detailed in Request a Payment – Response
Testing your Pay by Link
In Sandbox mode, you should be able to test your Pay by Link by selecting one of our mock banks in the checkout. We recommend you test for all relevant payment statuses to ensure that your system can cope with both successful and failed outcomes.