Below shows how the Payment link flow Integration works:
From your server, call our create Create Payment link, Validate Payment link, Initiate the payment link endpoint with the payment details.
We'll return a link alias to a payment page. Redirect your customer to this link to make the payment.
When the transaction is completed, we'll redirect the customer back to you.
Step 1: Call Create Payment Link Endpoint
Panel | ||
---|---|---|
| ||
Title: Create Payment link |
Panel | ||
---|---|---|
| ||
Description : This service endpoint may be used consumed to generate create payment link |
Panel | ||
---|---|---|
| ||
URL: api |
Panel | ||
---|---|---|
| ||
Base URL: |
Panel | ||
---|---|---|
| ||
HTTP Method: POST |
...
Panel | ||
---|---|---|
| ||
Request Payload |
Here are the details you'll need:
Code Block | ||
---|---|---|
| ||
{
"name": "Invoice Test 5",
"description": "Test",
"linkType": 1,
"amountType": 1,
"currencyCode": "GBP",
"amountInfo": {
"currencyCode": "GBP",
"amount": 12
}
} |
Code Block | ||
---|---|---|
| ||
"linkType": 0 - oneTime, 1 - reusable
"amountType": 0 - Static, 1 - Dynamic |
Element | Description | Type | Example | Required |
| This is a unique name for the payment link. | string | TV Payment | Yes |
| This describes the payment link in details | string | Link to pay for your TV | Yes |
| This indicates the payment link type. 0 - OneTime 1 - Reusable | integer | linkType: 0 | 1 | Yes |
| This indicate how the amount will be set for the payment link, e.g you might want to give user privileges to type the amount or give the link a defined amount
0 - Static 1 - Dynamic | integer | amountType: 0 | 1 | No
If not passed We will default it to “0” => Static |
| The transaction currency code of the amount, ISO3 | string | GBP | NGN
Note: Currency will be based on eligibility when go-live | Yes |
|
| object |
| Yes |
| The transaction currency code of the amount | string |
| Yes |
| The transaction amount | float | 100.00 | Yes |
Panel | ||
---|---|---|
| ||
Response Body Response code : 200 |
Code Block | ||
---|---|---|
| ||
{
"value": {
"id": "4e376b57-cbcb-4c69-8258-08dc7ef7dffe",
"name": "Invoice Test 5",
"description": "Test",
"alias": "0-hvhmxp0",
"link": "https://pay.leatherback.co/0-hvhmxp0",
"amountInfo": {
"currencyCode": "GBP",
"amount": 12
},
"linkType": "Reuseable",
"amountType": "Dynamic",
"supportEmail": null,
"logo": null,
"status": "New",
"createdDate": "2024-06-05T22:07:21.0548519+00:00",
"environment": "Test"
},
"isSuccess": true,
"error": "",
"message": "Request Successful",
"type": null,
"title": null,
"status": null,
"detail": null,
"instance": null
} |
Step 2: Call Validate Payment Endpoint
Panel | ||
---|---|---|
| ||
Title: Validate Payment link |
Panel | ||
---|---|---|
| ||
Description : This endpoint may be consumed to get the available channels for a transaction currency |
Panel | ||
---|---|---|
| ||
URL: : |
Panel | ||
---|---|---|
| ||
HTTP Method : POST |
Panel | ||
---|---|---|
| ||
Request Body |
Here are the details you'll need:
Code Block | ||
---|---|---|
| ||
amountInfo{ "amount": { "currencyCode": "GBP", "amount": 2 }, "channels": [ "Card", "PayByTransfer", "PayByAccount" ] } |
Element | Description | Type | Example | Required |
| The transaction amount | float, integer | 100 | Yes |
| The currency code of the transaction | string | Allowed currency, (GBP, NGN) | Yes |
| Channel of payment displayed to your user. If no channels is passed, all enabled channels for your account will be returned in the response | string[] | Allowed channels,
PayByAccount, Card, PayByTransfer | No |
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
If No channel is passed, response returned will be based on the eligible channels on your account |
Panel | ||
---|---|---|
| ||
Response Body Response code : 200 |
Code Block | ||
---|---|---|
| ||
{ "value": { "isValid": true, "channels": [ { "id": "9a69343e-c18d-4aeb-a0a2-0995b44596dc", "name": "Card", "alias": "Card", "description": null }, { "id": "6bdaf37f-9518-44d6-aa79-fafb382aa5c7", "name": "PayByAccount", "alias": "PayByAccount", "description": null } ] }, "isSuccess": true, "error": "", "message": "Request Successful", "type": null, "title": null, "status": null, "detail": null, "instance": null } |
Step 3: Call Initiate Payment Endpoint
Panel | ||
---|---|---|
| ||
Title: Initiate Payment link |
Panel | ||
---|---|---|
| ||
Description: This endpoint may be consumed to initiate the payment link transaction |
Panel | ||
---|---|---|
| ||
URL: |
Panel | ||
---|---|---|
| ||
HTTP Method: POST |
Here are the details you'll need:
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
Pass Reference value id generated from Validate Payment endpoint in the Reference field depending on the selected Channel (“Pay By transfer”, “Pay By Cards”) and Currency |
Panel | ||
---|---|---|
| ||
Request Body |
Code Block | ||
---|---|---|
| ||
{ "channel": "PayByTransfer", "amount": 500, "currency": "NGN", "narration": "SHOE", "reference": "4f737265-27cb-40fd-84a6-f41d999a39d1", "link": { "alias": "0-mjlyfib" }, " |
...
userInformation": { " |
...
firstName": "Ayobami", "lastName": "Queen", "phone": "08132681675", "emailAddress": |
...
"ayobamsy@yahoo.com" }, " |
...
paymentRequestProps": { "additionalProp1": "string", " |
...
additionalProp2": "string", " |
...
additionalProp3": |
...
"string" }, " |
...
metaData": { "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" } } |
Channel:
An array of payment channels to control what channels you want to make available to the user to make a payment with. Available channels include: "pay by card", "PayByTransfer
", "pay with account
"amount
: The amount to charge the customer.currency Code
: A three-letter ISO code for the currency in which you want to accept the payment. A unique code that represents a defined business currency. E.g. NGN=Nigerian Naira, USD =United state State Dollars, etc. (Required) If you don't specify a value, we'll assume"NGN"
Tax Enabled:
Specify if Tax/fees is applicable on the purchase value (true, false)name
: This is the name of the item to be purchased via the payment linkdescription: This is the description of the item to be purchased
link Type
: This specify how often the payment link can be used. (Reusable, One-time)meta
datanarration:
This is usually a description of items being purchased by a customerreference:
This is an Id that uniquely identifies a channel type (this is derived from the Validate Payment endpoint response)alias:
An alias allows users to access a page (node) or file at an alternative path. A redirect is moving a user to the correct file or page (node) because it no longer exists at a previous path. Alias lets you choose a nickname for your page, meaning a new URL that points to the content the same way the original URL doesfirstName:
This is the first Name of the CustomerlastName:
This is the Last Name of the Customerphone:
This is the phone number of the CustomeremailAddress
: This is the email address of the customermetadata
(optional): An object containing any extra information you'd like to store alongside the transaction e.g{CVV
Panel | ||
---|---|---|
Code Block | ||
| ||
Sample Code | ||
| ||
Response Body Response code : 200 |
Code Block | ||
---|---|---|
| ||
{ "value": { "paymentStatus": "REQUIRE_USER_OFFLINE_ACTION", "message": "Payment Initiated", "bankAuthURL": null, "paymentItem": { "channel": "PayByTransfer", "message": "Payment Initiated", "amount": 500, "fees": 0, "currencyCodereference": "NGN4f737265-27cb-40fd-84a6-f41d999a39d1", "amountmetaData": { 500 }, "taxtransfer-info": { "isEnabled "note": true"NILL", }"bank": "Providus", "name "account_number": "Redmi9979314914", "descriptionaccount_name": "Redmi 11proMERCHANT(jkkffg)", "linkType "expiration": 0,"2023-03-04T13:43:11.0447022Z", "metadatamode": { "banktransfer" } } } }, "isSuccess": true, "additionalProp1error": "string", "message": "", "additionalProp2type": null, "stringtitle": null, "status": null, "additionalProp3detail": null, "stringinstance": } }' null } |
Step 4: Call Authenticate Payment Endpoint
Panel | ||
---|---|---|
| ||
Title: Authenticate Payment link |
Panel | ||
---|---|---|
| ||
Description : This endpoint may be consumed to Authenticate (Card) transaction to confirm if it requires a 3ds authentication or not |
Panel | ||
---|---|---|
| ||
URL: |
Panel | ||
---|---|---|
| ||
HTTP Method : GET |
Here are the details you'll need:
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
Pass the Reference value id for channel Pay By transfer from Validate Payment endpoint |
Code Block | ||
---|---|---|
| ||
{
"referenceId": "4f737265-27cb-40fd-84a6-f41d999a39d1"
} |
reference:
This is an Id that uniquely identifies a channel type (this is derived from the Validate Payment endpoint response)
Panel | |
---|---|
|
...
| |
Response Body |
...
Response code : 200 |
Code Block | ||
---|---|---|
| ||
{ "type": "string", "title": "string", "status": 0, "detail": "string", "instance": "string", " |
...
isSuccess": |
...
true, "error": "string", "message": "string", " |
...
responseCode": " |
...
string", "value": { " |
...
status": " |
...
string", "IsAuthenticationEnabled": true, " |
...
Recommendation": " |
...
string", "message": "string", " |
...
authenticationhtml": " |
...
string" }, "additionalProp1": "string", "additionalProp2": "string", " |
...
additionalProp3": "string" } |
Step 5: Call Finalize Payment Endpoint
Panel | ||
---|---|---|
| ||
Title: Finalize Payment |
Panel | ||
---|---|---|
| ||
Description : This endpoint may be consumed to finalize the transaction |
Panel | ||
---|---|---|
| ||
URL: |
...
|
Panel | ||
---|---|---|
| ||
HTTP Method : POST |
Here are the details you'll need:
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
Pass Payment reference from Validate Payment endpoint |
Code Block | ||
---|---|---|
| ||
{
"paymentReference": "string"
} |
paymentreference:
This is an Id that uniquely identifies a payment made
Panel | ||
---|---|---|
| ||
Response Body Response code : 200 |
Code Block | ||
---|---|---|
| ||
{ "type": "string", "title": "string", "status": 0, "amountInfodetail": {"string", "instance": "string", "isSuccess": true, "error": "string", "currencyCodemessage": "NGNstring", "responseCode": "string", "value": { "amountstatus": 5000"string", "message": "string" }, "additionalProp1": "string", "linkTypeadditionalProp2": "Reuseablestring", "addi } |
Step 6: Call Transaction Reference Endpoint
Panel | ||
---|---|---|
| ||
Title: Call Transaction Reference |
Panel | ||
---|---|---|
| ||
Description: This endpoint retrieve the current transaction status for a transaction |
Panel | ||
---|---|---|
| ||
URL: |
Panel | ||
---|---|---|
| ||
HTTP Method : GET |
Here are the details you'll need:
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
Pass reference Id from Initiate Payment endpoint |
Element | Description | Type | Example | Required |
reference | Transaction reference of the transaction | String | path variables | To be passed as a path variable. Possible payment status: SUCCESSFUL, FAILED & PENDING | Yes |
Panel | ||
---|---|---|
| ||
Response Body Response code : 200 |
Code Block | ||
---|---|---|
| ||
{ "value": { " |
...
paymentReference": " |
...
836", "amount": { " |
...
currencyCode": " |
...
GBP", "amount": 1 |
...
}, "paymentStatus": " |
...
SUCCESSFUL | FAILED | PENDING" }, |
...
"isSuccess": true, |
...
|
...
"error": "",
|
...
"message": " |
...
",
|
...
"type": null, |
...
|
...
"title": null,
|
...
"status": null, |
...
"detail": null, |
...
"instance": null } |
Panel | ||
---|---|---|
Info | ||
| ||
Error Message |
...
Error
...
Cause
...
Solution
...
The {input field} is required
...
A mandatory field is empty
...
Ensure all mandatory fields and values are present.
...
payment link with given reference_id: notes already exists. Please create a payment link with a different reference_id
...
An existing reference id has been passed
...
Ensure that a unique reference id is used for all payment links.
| |||||
After the payment is initiated and completed successfully: We'll send you a webhook if you have that configured on the dev portal. We'll send an email receipt to your customer if the payment was successful |
\uD83D\uDCCB Related articles
Filter by label (Content by label) | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|