This endpoint will be used by the clients to retrieve the credit methods (Account Details) and debit methods that have been saved against a customer id.
Request Message Description
Field
# |
Field name | Data type | Max length | Required | Description |
1 | customerId | string | true | The Email or Mobile Number of the User. | |
2 | channelCode | string | true | The Code of the Channel from which this request is originated. |
Endpoint
GET /users/{customerId}/payment-methods?channelCode={channelCode} |
Host
https://sandbox.interswitchng.com/lending-service/api/v1 |
Headers
Authorization: Bearer {{token}} |
Sample request
/users/2348123456789/payment-methods?channelCode=FBNMOBILE |
Response Message field description
Field
# |
Field name | Description |
1 | responseCode | The code indicating the result of the processing of this request. |
2 | responseDescription | The Description of the responseCode. |
3 | creditMethods | [Array] of Account Details that the system has against the customerID |
3a | maskedAccount | The Masked Account Number of this credit method. |
3b | bankCode | The CBN Bank Code of the Bank holding the Account. |
3c | bankName | The Name of the Bank holding the Account. |
3d | id | The ID of the Credit Method. |
4 | debitMethods | [Array] of the Payment Cards that the system has against the customerID |
4a | maskedPan | The Masked PAN of the Payment Card. |
4b | requireCvv | A boolean (true/false) representing whether the user is to provide a CVV or not. |
4c | requirePin | A boolean (true/false) representing whether the user is to provide a Pin or not. |
4d | requireExpiry | A boolean (true/false) representing whether the user is to provide an Expiry or not. |
4e | paymentMethodIdentifier | The GUID representing the debit method. |
Sample Response (success)
{
“responseCode” : “00”, “responseDescription” : “Successful”, “creditMethods”: [ { “maskedAccount”: “0123**6789”, “bankCode”: “058”, “bankName”: “Guaranty Trust Bank”, “id”: “1234” } ], “debitMethods”: [ { “maskedPan”: “506099*********7499”, “requireCvv”: false, “requirePin”: false”, “requireExpiry”: false, “paymentMethodIdentifier”: “ADA4C1FFE6DE40C584ABD3CBAFDA0D08” }, { “maskedPan”: “519911******8080”, “requireCvv”: true, “requirePin”: true, “requireExpiry”: false, “paymentMethodIdentifier”: “713993DA61944C9A8CCBD15169798BF7” } ] } |
Sample Response (failure)
{
“responseCode” : “101”, “responseMessage” : “Error while processing request. Please try again.” } |