NGN Cards Integration
NGN Card Integration Process
Step 1: Call Validate Payment Endpoint
Title: Validate Payment
Description: This endpoint gives the available payment channel for a given currency
First, you need to gather and Pass the details below.
{
"amount": {
"currencyCode": "NGN",
"amount": 500
},
"channels": [
"string"
]
}
Element | Description | Type | Example | Required |
| An array of payment channels to control what channels you want to make available to the user to make a payment with. In this case, you will Card as Channel Value | String | ENUM | Available channels include: ["Card", "PayByTransfer", "pay with account" ]. | Yes |
| Transaction Amount to be sent | Float | Integer,
Must be greater or equal to 1.00, 2 Decimal places | 100, 100.20 | Yes |
| Currency Code for the transaction which is NGN | String, 3 digits | NGN | Yes |
{
"value": {
"isValid": true,
"channels": [
{
"id": "4f737265-27cb-40fd-84a6-f41d999a39d1",
"name": "PayByTransfer",
"alias": "PayByTransfer",
"description": null
},
{
"id": "2d60ca92-8f2f-486a-aa21-35cc9434898f",
"name": "Card",
"alias": "Card",
"description": null
}
]
},
"isSuccess": true,
"error": "",
"message": "Request Successful",
"type": null,
"title": null,
"status": null,
"detail": null,
"instance": null
}
Step 2: Call Initiate Payment Endpoint
First, you need to gather the transaction and Customer details as shown below
{
"amount": 1,
"channel": "Card",
"currency": "GBP",
"narration": "--", // Optional
"reference": "string", // Optional
"link": {
"alias": "0-k2tmbuy"
},
"userInformation": {
"firstName": "ogr",
"lastName": "et",
"phone": "08100969815",
"emailAddress": "etog@gmail.com"
},
"paymentRequestProps": {
"card": {
"cvv": "100",
"expMonth": 1,
"expYear": 2039,
"number": "4508750015741019"
}
},
"metaData": {
"return-url": "string", // sample - https://access.leatherback.co
}
}
Element | Description | Type | Example | Required |
| An array of payment channels to control what channels you want to make available to the user to make a payment with. In this case, you will Card as Channel Value | String | ENUM | Available channels include: ["Card", "PayByTransfer", "pay with account" ]. | Yes |
| Transaction Amount to be sent | Float | Integer,
Must be greater or equal to 1.00, 2 Decimal places | 100, 100.20 | Yes |
| Currency Code for the transaction which is NGN | String, 3 digits | NGN | Yes |
| Description for transaction, which user will see | String, maxlength: 100 character | E.g “Payment for lunch” | Yes |
| 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 does (This is only Mandatory when initiating a Payment Link transaction) | String | E.g | No |
| This is the first Name of the Customer | String |
| Yes |
| This is the Last Name of the Customer | String |
| Yes |
| This is the email address of the customer | String |
| Yes |
| This is phone number of the Customer | String |
| Yes |
| An object containing any extra information you'd like to store alongside the transaction: Pass The URL we redirect to after the customer completes payment. For 3DSecure payments, we'll append the |
|
| Yes |
| This is a string that would be redirected to as soon as there is a transaction status when the 3ds validation is done |
|
| Yes |
Step 3: Webhook is sent to your configured Webhook URL
Step 4 : Call GET Transaction Status
Test Cards | Card Number | 3-D Secure Enrolled |
---|---|---|
Mastercard | 5123450000000008 | Y |
| 2223000000000007 | Y |
| 5111111111111118 | N |
| 2223000000000023 | N |
Related articles
Leatherback 2024