1. Home
  2. Interswitch lending Service
  3. Interswitch Lending Service (Providers)
  4. Debit Customer

Debit Customer

This endpoint will be used by the providers for loan collection when the loan repayment is due.

Currently, there are two implementations in the debit customer endpoint. The same request will be used for both, but the response differs depending on which implementation is triggered. They are:

  1. Debit Customer from Card: The service will use the customer’s provided payment debit card to trigger a payment request to IPG with the specified amount.
  2. Debit Customer from Bank Account:  The service will use the customer’s bank account details to send a payment request to the specified bank. (NOTE: this will ONLY happen for banks that have provided their Direct-to-Account Debit APIs)

Request Message description

Field

 

#

Field nameData typeMax lengthRequiredDescription
1customerIdString 50trueThe Email or Mobile Number of the User.
2loanIdNumeric String 50trueThe loan id of the loan for which this debit is for.
3amountLong trueThe Amount to be debited from the user’s payment card. (This is in lower denomination KOBO)
4.providerCodeString50TrueThe provider code
5transactionIdString15falseThe Identifier for this transaction. This will be used to requery this transaction if needs be

Endpoint

POST /loans/{loanId}/debit

Headers

Authorization: Bearer {{token}}

Sample Request

{
"customerId": "2348123456789",
"providerCode": "MINES",
"transactionId": "958984578597843798438",
"amount": 1000000 // ten thousand naira only.
}

Response Message  field description

Field#Field nameData TypeMax LengthRequiredDescription
1responseCodeNumeric String5trueThe code indicating the result of the processing of this request.
2responseDescriptionString255trueThe Description of the responseCode.
3transactionRefString50trueThe Quickteller Transaction Reference of the Debit done.
4balanceLong
falseThe customer’s balance will be returned when he/she does not have sufficient funds to pay back the loan.
5transactionIdString

The Identifier of this transaction. This will be used of requery of this transaction if needs be.
6transactionDateString
falseThis is the date/timestamp of the direct-to-account debit request.
7.requestReferenceString20falseThis is the unique identifier for all direct-to-account debit requests.

Sample Response for Card Debit (success)

{
"responseCode": "00",
"responseDescription": "Successful",
"transactionRef": "UBN|WEB|ILS|20170501120945|0198849",
"transactionId": "958984578597843798438"
}

Sample Response for Account Debit (success)

{
"responseCode": "00",
"responseMessage": "Successful",
"transactionId": "12341234abcd",
"amount": 5000,
"transactionDate": "2019-12-17 14:21:06",
"requestReference": "2634301"
}

Sample Response Card Debit (failure)

{
"responseCode": "96",
"responseMessage": "Issuer or Switch Inoperative."
}

Sample Response Account Debit (failure)

{
"responseCode": "07",
"responseMessage": "Invalid Account",
"transactionId": "2214201090888345937",
"amount": "2000",
"transactionDate": "2019-12-17 14:08:38",
"requestReference": "2634279"
}

Sample Response for Account Debit (duplicate)

{
"responseCode": "94",
"responseMessage": "Duplicate Transaction",
"transactionId": "12341234abcd",
"amount": 5000,
"transactionDate": "2019-12-17 14:21:39",
"requestReference": "2634302"
}

Was this article helpful to you? Yes 1 No

How can we help?