Users can Application link which is the BaseURL to connect to the payment link application by using this link:https://pay.leatherback.co/redirect
/$%7Bdata%7D
Info |
---|
Please note that the data object to be appended is in a base64 format. This can be achieved using the javascript |
A sample of the object parameter to be passed is shown below;
Panel | ||
---|---|---|
| ||
SAMPLE REQUEST PAYLOAD |
Expand | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||
| |||||||||||||||||||||
Panel | |||||||||||||||||||||
| |||||||||||||||||||||
Please note, that there is a collection of user information on the payment application, if you don’t want this option, the showPersonalInformation flag should be false and the customerEmail and customerName should be part of the payload as shown above; Also note, that if the key shouldWindowClose is true, the page won't redirect, the page will only close. These are for cases where the link is being hosted in an iframe.
|
Element | Description | Type | Example | Required |
| This is your URL what will be redirected after transaction is successful or failed | string | Yes | |
| Your public key, ensure you switch based on the environment | string | For test, pk_test_*****
For Live, pk_live_**** | Yes |
| This show the page for your customer to enter their information | boolean | false | Yes |
| Email of the customer making payment | string | Yes | |
| Full Name of the customer making payment | string | Vee Test | Yes |
| Reference for the transaction, this must be unique per transaction | string |
| Yes |
| Refer to implementation recommendation below | boolean | False (recommended) | Yes |
| Amount for the transaction | Integer | float | 100, 100.30 | Yes |
| Currency code for your transaction, based on the currency enabled on your portal | string | NGN, GBP, CAD | Yes |
Panel | ||
---|---|---|
| ||
Implementation Steps |
Generate your payload as describe in the sample payload above
Stringify the payload if javascript, e.g. JSON.stringify(payload)
Convert/Encode to base64 format, in Javascript, you can use btoa(payload)
Append the encoded object as a “path params” and not query params e.g. You can click on the link below for confirmation.
Follow the payment steps returned.
On redirect to your provided URL, the reference of the transaction is returned as a query params e.g https://your-redirect-url.com/redirect.html?reference=99frbZck1
You can use the reference to get the status of the transaction as your desire.
Panel | ||
---|---|---|
| ||
Implementation Recommendation |
for shouldWindowClose = true
● if shouldWindowClose is set to true and link is opened in new tab, the new tab will close automatically after the transaction is completed but won't redirect to the URL you provided
● if shouldWindowClose is set to true and link is opened in the same tab, the transaction page remain open and won't redirect to the URL you provided
for shouldWindowClose = false (recommended)
● if shouldWindowClose is set to false and link is opened in same tab, the transaction page will close automatically when completed and it would be redirected to the URL you provided
if shouldWindowClose is set to false and link is opened in new tab, the transaction page will close automatically when completed but the redirect to the provided URL will take effect on the new opened tab
\uD83D\uDCCB Related articles
...