Recurring Payments
The endpoints below provides you the ability to tokenize a card and use the returned payment token and expiry to perform purchase transactions.
Please note, this service is only for Verve and Mastercard brand cards.
Tokenize Card
This function tokenizes a card.
1 |
POST /api/v2/purchases/validations/recurrents |
Request headers
1 2 3 4 5 6 7 8 9 10 11 |
Content-Type: application/json Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsidmF1bHQiXSwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwNDIzODcxMDE5OTUiLCJyZXF1ZXN0b3JfaWQiOiIw MDE4MzQzODA5MSIsInNjb3BlIjpbInByb2ZpbGUiXSwiZXhwIjoxNDUzMjM4NjY4LCJqdGkiOiIzMWYwNmJkOC04MTlhLTQ4OTMtOWM5NC1kMDhmMTgwOGY3NjgiLCJjbGllbnRfaWQiOiJ JS0lBNTFFNTI2MDkxNzFGNUMwMkQ2MzgzNTU2NkIwMTZBN0JEQ0EzRTc1MSIsInBheW1lbnRfY29kZSI6IjA1MTQxMzcxMTYyNDEifQ.KTwAdq55udg_CcZ7Q5hurvIwRTETm0fpWYSHBzG RlKA4vyMhJJn-1mvhxV79RC3VpaJc0W0hcTNEMQWmY4yrSzsyakzBzc_XrLVM8ZmBRNqalFY7IoJFCHONiGlxklujjK600aUBtKhLxwWEV6wUU_O8qZqI1ea4fJRHdAyUetsBUSqvYB1vBM T6luamaDOtaBDiikxy0giwP5oiOFjuBvd8a33ROaWE0DuQz7EfobfbZiXKdiEHV5c9bZmImIGwiLtJXBesPImn1eBrM5wWJ_gMLueCnBrisxXyTkLjVMBJJJy5AT8OjY1bAAn8cjwDLORO5 -ejQxMMh15U59fWIQ Timestamp: 1361281946 Nonce: 634968823463411609 Signature: 2cFwCfkgRR7mlIOlcjTQXCUYpLmtlKJkCb8RUzIX0-k= SignatureMethod: SHA-256 |
Request Payload
1 2 3 4 |
{ "transactionRef": "JB-123734357-ReccValid", "authData":"mGR04cy8g7bKhGiF+2YdPB+2+mbZYrH90mrhc5DM1g/YpkHMbeuNWu1JpYzUpO/zRrhalAAudhp9+mlb/FmR+ihGxr7hk+GvrVWQRod+kuXPiooPStFHjU3tPYKiDkiiIWXhjWk92BkNkuKYWRqeo/Va8rkAF24BS45mjxWHbpRKEUysfDCRLTqPx2rwdt2lQ03J+eKriJ0Hf9U2FY8WHjQCp6axsSqF0sHGO8OVf2KjTDeFt2KyRmEaNWxjuNpFOgW9YG2BPrKs7YuefDqHmRJYWnyn5O1c+9N9Iz9RB7AK8z0gFBZI2rH+pxx7qaxpwx/CpTFiOWE+d9EKQliAnw==" } |
Sample response (Success)
Find below a sample response.
1 2 3 4 5 6 7 8 |
{ "cardType": "MasterCard", "balance": "100.00", "token": "5123456038336710", "tokenExpiryDate": "2004", "panLast4Digits": "0106", "transactionRef": "JB-1532675702-ReccValid" } |
Purchase
This function uses a token and expiry to perform a purchase.
1 |
POST /api/v2/purchases/recurrents |
Request headers
1 2 3 4 5 6 7 8 9 10 11 |
Content-Type: application/json Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsidmF1bHQiXSwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwNDIzODcxMDE5OTUiLCJyZXF1ZXN0b3JfaWQiOiIw MDE4MzQzODA5MSIsInNjb3BlIjpbInByb2ZpbGUiXSwiZXhwIjoxNDUzMjM4NjY4LCJqdGkiOiIzMWYwNmJkOC04MTlhLTQ4OTMtOWM5NC1kMDhmMTgwOGY3NjgiLCJjbGllbnRfaWQiOiJ JS0lBNTFFNTI2MDkxNzFGNUMwMkQ2MzgzNTU2NkIwMTZBN0JEQ0EzRTc1MSIsInBheW1lbnRfY29kZSI6IjA1MTQxMzcxMTYyNDEifQ.KTwAdq55udg_CcZ7Q5hurvIwRTETm0fpWYSHBzG RlKA4vyMhJJn-1mvhxV79RC3VpaJc0W0hcTNEMQWmY4yrSzsyakzBzc_XrLVM8ZmBRNqalFY7IoJFCHONiGlxklujjK600aUBtKhLxwWEV6wUU_O8qZqI1ea4fJRHdAyUetsBUSqvYB1vBM T6luamaDOtaBDiikxy0giwP5oiOFjuBvd8a33ROaWE0DuQz7EfobfbZiXKdiEHV5c9bZmImIGwiLtJXBesPImn1eBrM5wWJ_gMLueCnBrisxXyTkLjVMBJJJy5AT8OjY1bAAn8cjwDLORO5 -ejQxMMh15U59fWIQ Timestamp: 1361281946 Nonce: 634968823463411609 Signature: 2cFwCfkgRR7mlIOlcjTQXCUYpLmtlKJkCb8RUzIX0-k= SignatureMethod: SHA-256 |
Request Payload
1 2 3 4 5 6 7 8 |
{ "customerId": "CustID-1532675715", "amount": "90", "currency":"NGN", "token": "5123456038336710", "tokenExpiryDate": "2004", "transactionRef": "JB-1532675715-ReccPurch" } |
Sample response (Success)
Find below a sample response.
1 2 3 4 5 6 |
{ "transactionIdentifier": "HBP|API|MX1209|27-07-2018|249915|579180", "message": "Approved by Financial Institution", "amount": "90.00", "transactionRef": "JB-1532675715-ReccPurch" } |