Pay by Card
Step 1: Call Initiate Payment Endpoint
Title: Initiate Payment
Description: This endpoint is used to initiate a payment transaction irrespective of the channel
URL: https://laas.leatherback.co/api/payment/pay/Initiate
First, you need to gather the transaction and Customer details as shown below:
{
"amount": 1,
"channel": "Card",
"currency": "GBP",
"narration": "--",
"reference": "string",
"userInformation": {
"firstName": "Dave",
"lastName": "MC",
"emailAddress": "mcdave@test.com",
"phone": "070 0000 0000"
},
"paymentRequestProps": {
"card": {
"cardNumber": "4242 4242 4242 4242",
"cvv": "123",
"expiryDate": "06/25",
"expMonth": 6,
"expYear": 2025,
"number": "4242424242424242"
}
},
"metaData": {
}
}
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 | Card | 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 | GBP | Yes |
| Description for transaction, which user will see | String, maxlength: 100 character | E.g. “Payment for lunch” | Yes |
| This is a unique alphanumeric code assigned to every payment | String max length: 20 characters | LTZDOR55606793 | No |
| This is the first Name of the Customer | String | John | Yes |
| This is the Last Name of the Customer | String | Doe | 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 |
|
"metaData": {
} | Yes |
CVV | CVV stands for Card Verification Value. This code is usually composed of a three-digit number provided by the companies that make the bank cards (American Express, Visa, Mastercard, etc.). The CVV code is usually located on the back of the card | String | 654 | Yes |
| This is the month of the year the card is due to expire | String | 7 | Yes |
| This is the year the card is due to expire | String | 2025 | Yes |
| This is the long number on the front of your card. It's usually 16-19 digits and is unique to a card | String | 4242 4242 4242 4242 | Yes |
{
"value": {
"paymentStatus": "INITIATED",
"message": "Payment Initiated Successfully",
"bankAuthURL": null,
"paymentItem": {
"channel": "Card",
"message": "Payment Initiated Successfully",
"amount": 1,
"fees": 0,
"reference": "THGUJYNHACLVSPG",
"paymentReference": "THGUJYNHACLVSPG",
"metaData": {}
}
},
"isSuccess": true
}
Step 2: Call GET Transaction Status
Related content
Leatherback 2024