Nano Loans
Lending service provides a platform that allows users borrow small amounts at low interest rates and with ease of repayment.
If you're a lender, we offer various lending implementation methods based on your business model. Explore our range of APIs to fulfill your specific business requirements.
- Provider Integration: This is designed for lenders that want to disburse and collect loans through various channels and also on their channel.
- Channel Integration: This is designed for channel owners who aren't loan providers but wish to facilitate loan access through their channels. There are two types of channel partners: those with PCI-DSS licenses and those without. For the latter group (without PCI-DSS licenses), we offer hosted fields to help them gather customer card details.
1 - Provider Integration
We offer two methods for providers to integrate with our lending service:
- Loan Providers (Lenders without a Channel)
- Loan Providers + Channel Providers (Lenders with a Channel)
Process flow for lenders without a channel
Please Note:
You need to have these endpoints defined on your application - Accept Offers, Get Offers, Get Loan Status, Payment Notification.
Step 1: Fetch available loan offers
Make a post request to the Get Offers endpoint to get a list of the available loan offers
Step 2: Get customer information
After getting the list of available loan offers you can then make a request to the Get Customer Information endpoint to obtain the customer's information
Request:
curl --request GET \
--url 'https://sandbox.interswitchng.com/lending-service-data-service/api/v1/customer-details/transactions/MIG1234567?offerRequestReference=MIG1234567' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsiY2FyZGxlc3Mtc2VydmljZSIsImluY29nbml0byIsImlzdy1jb2xsZWN0aW9ucyIsImlzdy1jb3JlIiwiaXN3LWxlbmRpbmctc2VydmljZSIsImlzdy1wYXltZW50Z2F0ZXdheSIsInBhc3Nwb3J0IiwicGF5bWVudC1zZXJ2aWNlIiwicHJvamVjdC14LW1lcmNoYW50IiwidmF1bHQiXSwibWVyY2hhbnRfY29kZSI6Ik1YMTg3IiwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwMDE2NDYzOTg1NCIsInJlcXVlc3Rvcl9pZCI6IjAwMTE3NjE0OTkyIiwic2NvcGUiOlsicHJvZmlsZSJdLCJqdGkiOiIzNTFjNDQ5MS01YzcwLTRhOTEtODRiZS0zZjNjY2Q1YzE2Y2MiLCJwYXlhYmxlX2lkIjoiMjMyNCIsImNsaWVudF9pZCI6IklLSUE5NjE0QjgyMDY0RDYzMkU5QjY0MThERjM1OEE2QTRBRUE4NEQ3MjE4IiwicGF5bWVudF9jb2RlIjoiMDQyNTk0MTMwMjQ2In0.P2mUITLA2bsmMryCyuVwDXK-4ozcRYtEKIN1t-qRPZaUStKleLsgxQxJqXv0EZ0CIYbAECw28AeJmbiBtosVSQ824unhfYTyhRCAt1olO_pNwf6PPmMNVTUO5q7F1b3CQPKP5D3VmNMw3MrHUzTzLwqMMzTIAYWf3V-7TEuHBOVzTsOtmuV-j63qASkFGsn_3x-TwgPVeOZ-INnDtXnSCSwQKG10q0_QE7B-ke2v0Up0vxXJ4wTsX8qWm6sJ5Bn_GU260qNPnVCip93xhzAHv7e__ONfeTMdDVPypQ0lyKgcR0FcBrJqONz6yifuu2BfoGeDkXV1cyZFhZg_xwiFYw' \
--header 'accept: application/json'
Response:
{
"_id": "5efc893f46cf550aeda91f41",
"status": "success",
"message": "Callback successfully returned!",
"data": {
"transactions": [
{
"id": "5efc895b46cf550aeda91f47",
"notes": {
"topics": [
"c"
],
"places": [
"c"
],
"people": [
"b"
],
"actions": [
"a"
],
"subjects": [
"b"
],
"preopositions": [
"a"
],
"desc": "Quis ad ratione culpa consequatur sit."
},
"fetched": [],
"owner": [
"5edfd8605aa993069041bea4"
],
"record": [
"5efc893f46cf550aeda91f41"
],
"branch": "OFMAIMZ1514",
"code": "c",
"credit": 98821,
"customer": "5ef09108658acd0d06ae06b9",
"env": "production-sandbox",
"bank": "5d6fe57a4099cc4b210bbeb9",
"cleared_date": "2020-07-01T12:16:45.728Z",
"unformatted_cleared_date": "01-07-2020",
"trans_date": "2020-07-01T09:48:53.173Z",
"unformatted_trans_date": "01-07-2020",
"created_at": "2020-07-01T13:02:19.610Z",
"last_updated": "2020-07-01T13:02:19.610Z"
},
{
"id": "5efc895b46cf550aeda91f45",
"notes": {
"topics": [
"b"
],
"places": [
"b"
],
"people": [
"c"
],
"actions": [
"a"
],
"subjects": [
"a"
],
"preopositions": [
"a"
],
"desc": "Voluptatem ut commodi laudantium repudiandae molestiae numquam consectetur est repellat."
},
"fetched": [],
"owner": [
"5edfd8605aa993069041bea4"
],
"record": [
"5efc893f46cf550aeda91f41"
],
"branch": "TPNEBEH1",
"code": "w",
"credit": 28082,
"customer": "5ef09108658acd0d06ae06b9",
"env": "production-sandbox",
"bank": "5d6fe57a4099cc4b210bbeb9",
"cleared_date": "2020-06-30T16:17:43.904Z",
"unformatted_cleared_date": "30-06-2020",
"trans_date": "2020-06-30T20:33:33.219Z",
"unformatted_trans_date": "30-06-2020",
"created_at": "2020-07-01T13:02:19.609Z",
"last_updated": "2020-07-01T13:02:19.609Z"
}
}
}
Step 3: Confirm the customer's credit score
Request the credit score endpoint. This endpoint returns the customer’s current credit score generated by the credit score engine for the customer.
Request:
curl https://sandbox.interswitchng.com//v1/credit-score?msisdn=2348123456789 \
-H "Authorization: <token>" \
-H "Content-Type: application/json"
-X GET
Response:
{
“responseCode”: “00”,
“responseDescription”: “Successful”,
“creditScores”: [
{
“id”: 487,
“msisdn”: “2348123456789”,
“score”: “32”,
“dateCreated”: “2020-09-04”
}
]
}
Step 4: Make a loan offer to the customer
After validating and confirming customer eligibility, provide a loan offer. Upon the customer's selection of your offer, make an API request to the Accept Offer endpoint to complete the acceptance process.
Request:
curl --request POST \
--url https://sandbox.interswitchng.com/lending-service/api/v1/offers/xxxxxx9090/accept \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsiY2FyZGxlc3Mtc2VydmljZSIsImluY29nbml0byIsImlzdy1jb2xsZWN0aW9ucyIsImlzdy1jb3JlIiwiaXN3LWxlbmRpbmctc2VydmljZSIsImlzdy1wYXltZW50Z2F0ZXdheSIsInBhc3Nwb3J0IiwicGF5bWVudC1zZXJ2aWNlIiwicHJvamVjdC14LW1lcmNoYW50IiwidmF1bHQiXSwibWVyY2hhbnRfY29kZSI6Ik1YMTg3IiwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwMDE2NDYzOTg1NCIsInJlcXVlc3Rvcl9pZCI6IjAwMTE3NjE0OTkyIiwic2NvcGUiOlsicHJvZmlsZSJdLCJqdGkiOiIzNTFjNDQ5MS01YzcwLTRhOTEtODRiZS0zZjNjY2Q1YzE2Y2MiLCJwYXlhYmxlX2lkIjoiMjMyNCIsImNsaWVudF9pZCI6IklLSUE5NjE0QjgyMDY0RDYzMkU5QjY0MThERjM1OEE2QTRBRUE4NEQ3MjE4IiwicGF5bWVudF9jb2RlIjoiMDQyNTk0MTMwMjQ2In0.P2mUITLA2bsmMryCyuVwDXK-4ozcRYtEKIN1t-qRPZaUStKleLsgxQxJqXv0EZ0CIYbAECw28AeJmbiBtosVSQ824unhfYTyhRCAt1olO_pNwf6PPmMNVTUO5q7F1b3CQPKP5D3VmNMw3MrHUzTzLwqMMzTIAYWf3V-7TEuHBOVzTsOtmuV-j63qASkFGsn_3x-TwgPVeOZ-INnDtXnSCSwQKG10q0_QE7B-ke2v0Up0vxXJ4wTsX8qWm6sJ5Bn_GU260qNPnVCip93xhzAHv7e__ONfeTMdDVPypQ0lyKgcR0FcBrJqONz6yifuu2BfoGeDkXV1cyZFhZg_xwiFYw' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"customerId": "234000000000000",
"offerId": "KB9090",
"destinationAccountNumber": "09999222",
"destinationBankCode": "044",
"token": "9202020",
"loanReferenceId": "KBPOB60"
}
'
Response:
{
“responseCode”: “00”,
“responseMessage”: “Successful”
“loanId”:”0329”
}
Step 5: Verify customer account number
Verify the accuracy of the customer's bank account details to prevent any errors in loan disbursement. This is to ensure you are not sending the funds to the wrong person/account or to ensure the account number is valid.
Request:
curl --request GET \
--url https://sandbox.interswitchng.com/api/v1/inquiry/bank-code/SORT_CODE/account/ACCOUNT_NUMBER \
--header 'accept: application/json' \
--header 'authorization: Bearer 9090909'
Response:
{
"responseCode": "00",
"responseMessage": "Successful",
"bvn": "12345678901",
"accountNumber": "0987654321",
"accountName": "JOHN JUNIOR DOE",
"bankCode": "058",
"firstName": "JOHN",
"lastName": "DOE",
"dob": "“01-Jan-70",
"phone": "08012345678",
"residentialAddress": "8 MARS FLAT,JOHNSON CRES. IKORODU ROAD LAGOS STATE"
}
Step 6: Update loan status - Optional
Update the loan status of the customer on the Interswitch lending service by calling the update loan status endpoint
This only applies if the customer pays directly to your system and wants to match the loan status between Interswitch and your platform.
Request:
curl --request PUT \
--url https://sandbox.interswitchng.com/lending-service/api/v1/loans/09091/update \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsiY2FyZGxlc3Mtc2VydmljZSIsImluY29nbml0byIsImlzdy1jb2xsZWN0aW9ucyIsImlzdy1jb3JlIiwiaXN3LWxlbmRpbmctc2VydmljZSIsImlzdy1wYXltZW50Z2F0ZXdheSIsInBhc3Nwb3J0IiwicGF5bWVudC1zZXJ2aWNlIiwicHJvamVjdC14LW1lcmNoYW50IiwidmF1bHQiXSwibWVyY2hhbnRfY29kZSI6Ik1YMTg3IiwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwMDE2NDYzOTg1NCIsInJlcXVlc3Rvcl9pZCI6IjAwMTE3NjE0OTkyIiwic2NvcGUiOlsicHJvZmlsZSJdLCJqdGkiOiIzNTFjNDQ5MS01YzcwLTRhOTEtODRiZS0zZjNjY2Q1YzE2Y2MiLCJwYXlhYmxlX2lkIjoiMjMyNCIsImNsaWVudF9pZCI6IklLSUE5NjE0QjgyMDY0RDYzMkU5QjY0MThERjM1OEE2QTRBRUE4NEQ3MjE4IiwicGF5bWVudF9jb2RlIjoiMDQyNTk0MTMwMjQ2In0.P2mUITLA2bsmMryCyuVwDXK-4ozcRYtEKIN1t-qRPZaUStKleLsgxQxJqXv0EZ0CIYbAECw28AeJmbiBtosVSQ824unhfYTyhRCAt1olO_pNwf6PPmMNVTUO5q7F1b3CQPKP5D3VmNMw3MrHUzTzLwqMMzTIAYWf3V-7TEuHBOVzTsOtmuV-j63qASkFGsn_3x-TwgPVeOZ-INnDtXnSCSwQKG10q0_QE7B-ke2v0Up0vxXJ4wTsX8qWm6sJ5Bn_GU260qNPnVCip93xhzAHv7e__ONfeTMdDVPypQ0lyKgcR0FcBrJqONz6yifuu2BfoGeDkXV1cyZFhZg_xwiFYw' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"status": "CLOSED",
"loanId": "09091",
"providerCode": "ABCREDIT"
}
'
Response:
{
"responseCode": "00",
"responseMessage": "Successful"
}
Step 7 :Credit the customer
Provided the customer is eligible for a loan and validation checks have been completed, credit the customer.
Request
curl --request POST \
--url https://sandbox.interswitchng.com/lending-service/api/v1/loans/10000000044/fund \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsiY2FyZGxlc3Mtc2VydmljZSIsImluY29nbml0byIsImlzdy1jb2xsZWN0aW9ucyIsImlzdy1jb3JlIiwiaXN3LWxlbmRpbmctc2VydmljZSIsImlzdy1wYXltZW50Z2F0ZXdheSIsInBhc3Nwb3J0IiwicGF5bWVudC1zZXJ2aWNlIiwicHJvamVjdC14LW1lcmNoYW50IiwidmF1bHQiXSwibWVyY2hhbnRfY29kZSI6Ik1YMTg3IiwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwMDE2NDYzOTg1NCIsInJlcXVlc3Rvcl9pZCI6IjAwMTE3NjE0OTkyIiwic2NvcGUiOlsicHJvZmlsZSJdLCJqdGkiOiIzNTFjNDQ5MS01YzcwLTRhOTEtODRiZS0zZjNjY2Q1YzE2Y2MiLCJwYXlhYmxlX2lkIjoiMjMyNCIsImNsaWVudF9pZCI6IklLSUE5NjE0QjgyMDY0RDYzMkU5QjY0MThERjM1OEE2QTRBRUE4NEQ3MjE4IiwicGF5bWVudF9jb2RlIjoiMDQyNTk0MTMwMjQ2In0.P2mUITLA2bsmMryCyuVwDXK-4ozcRYtEKIN1t-qRPZaUStKleLsgxQxJqXv0EZ0CIYbAECw28AeJmbiBtosVSQ824unhfYTyhRCAt1olO_pNwf6PPmMNVTUO5q7F1b3CQPKP5D3VmNMw3MrHUzTzLwqMMzTIAYWf3V-7TEuHBOVzTsOtmuV-j63qASkFGsn_3x-TwgPVeOZ-INnDtXnSCSwQKG10q0_QE7B-ke2v0Up0vxXJ4wTsX8qWm6sJ5Bn_GU260qNPnVCip93xhzAHv7e__ONfeTMdDVPypQ0lyKgcR0FcBrJqONz6yifuu2BfoGeDkXV1cyZFhZg_xwiFYw' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"customerId": "2348123456789",
"loanId": "10000000044",
"amount": 5000,
"providerCode": "PTB",
"currencyCode": "566",
"transactionId": "145688247533498",
"qtTerminalId": "QTB5",
"loanReferenceId": "Ltb5:9090"
}
'
Response
{
"responseCode": "00",
"responseMessage": "Transaction Successful",
"transactionRef": "UBN|WEB|ILS|20170501091282|01238797",
"transactionId": "198988747587875"
}
Step 8
Update the loan status on your end to OPEN once the customer's account has been funded.
Step 9 Inform the customer of the credit
After updating the loan status of the customer send a message using the send SMS endpoint to the customer informing them of the credit. Sometimes, due to flaky internet connectivity or some other factors in which the credit process fails, you can perform a requery to confirm the status of the transaction.
Request
curl --request POST \
--url 'https://sandbox.interswitchng.com/lending-service/api/v1/sms?providerCode=PTB&customerId=2348123456789' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsiY2FyZGxlc3Mtc2VydmljZSIsImluY29nbml0byIsImlzdy1jb2xsZWN0aW9ucyIsImlzdy1jb3JlIiwiaXN3LWxlbmRpbmctc2VydmljZSIsImlzdy1wYXltZW50Z2F0ZXdheSIsInBhc3Nwb3J0IiwicGF5bWVudC1zZXJ2aWNlIiwicHJvamVjdC14LW1lcmNoYW50IiwidmF1bHQiXSwibWVyY2hhbnRfY29kZSI6Ik1YMTg3IiwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwMDE2NDYzOTg1NCIsInJlcXVlc3Rvcl9pZCI6IjAwMTE3NjE0OTkyIiwic2NvcGUiOlsicHJvZmlsZSJdLCJqdGkiOiIzNTFjNDQ5MS01YzcwLTRhOTEtODRiZS0zZjNjY2Q1YzE2Y2MiLCJwYXlhYmxlX2lkIjoiMjMyNCIsImNsaWVudF9pZCI6IklLSUE5NjE0QjgyMDY0RDYzMkU5QjY0MThERjM1OEE2QTRBRUE4NEQ3MjE4IiwicGF5bWVudF9jb2RlIjoiMDQyNTk0MTMwMjQ2In0.P2mUITLA2bsmMryCyuVwDXK-4ozcRYtEKIN1t-qRPZaUStKleLsgxQxJqXv0EZ0CIYbAECw28AeJmbiBtosVSQ824unhfYTyhRCAt1olO_pNwf6PPmMNVTUO5q7F1b3CQPKP5D3VmNMw3MrHUzTzLwqMMzTIAYWf3V-7TEuHBOVzTsOtmuV-j63qASkFGsn_3x-TwgPVeOZ-INnDtXnSCSwQKG10q0_QE7B-ke2v0Up0vxXJ4wTsX8qWm6sJ5Bn_GU260qNPnVCip93xhzAHv7e__ONfeTMdDVPypQ0lyKgcR0FcBrJqONz6yifuu2BfoGeDkXV1cyZFhZg_xwiFYw' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"providerCode": "PTB",
"msisdn": "2348123456789",
"message": "A message has been sent to you",
"loanId": "10000000044",
"customerId": "2348123456789"
}
'
Response
{
"responseCode": "00",
"responseMessage": "Successful"
}
Step 10: Collect payment from the customer at the loan due date
To collect payments from the customers make a call to the Debit Customer endpoint.
Request
curl --request POST \
--url https://sandbox.interswitchng.com/lending-service/api/v1/loans/OFFER1598612621100/debit \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsiY2FyZGxlc3Mtc2VydmljZSIsImluY29nbml0byIsImlzdy1jb2xsZWN0aW9ucyIsImlzdy1jb3JlIiwiaXN3LWxlbmRpbmctc2VydmljZSIsImlzdy1wYXltZW50Z2F0ZXdheSIsInBhc3Nwb3J0IiwicGF5bWVudC1zZXJ2aWNlIiwicHJvamVjdC14LW1lcmNoYW50IiwidmF1bHQiXSwibWVyY2hhbnRfY29kZSI6Ik1YMTg3IiwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwMDE2NDYzOTg1NCIsInJlcXVlc3Rvcl9pZCI6IjAwMTE3NjE0OTkyIiwic2NvcGUiOlsicHJvZmlsZSJdLCJqdGkiOiIzNTFjNDQ5MS01YzcwLTRhOTEtODRiZS0zZjNjY2Q1YzE2Y2MiLCJwYXlhYmxlX2lkIjoiMjMyNCIsImNsaWVudF9pZCI6IklLSUE5NjE0QjgyMDY0RDYzMkU5QjY0MThERjM1OEE2QTRBRUE4NEQ3MjE4IiwicGF5bWVudF9jb2RlIjoiMDQyNTk0MTMwMjQ2In0.P2mUITLA2bsmMryCyuVwDXK-4ozcRYtEKIN1t-qRPZaUStKleLsgxQxJqXv0EZ0CIYbAECw28AeJmbiBtosVSQ824unhfYTyhRCAt1olO_pNwf6PPmMNVTUO5q7F1b3CQPKP5D3VmNMw3MrHUzTzLwqMMzTIAYWf3V-7TEuHBOVzTsOtmuV-j63qASkFGsn_3x-TwgPVeOZ-INnDtXnSCSwQKG10q0_QE7B-ke2v0Up0vxXJ4wTsX8qWm6sJ5Bn_GU260qNPnVCip93xhzAHv7e__ONfeTMdDVPypQ0lyKgcR0FcBrJqONz6yifuu2BfoGeDkXV1cyZFhZg_xwiFYw' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"customerId": "2348123456789",
"loanId": "OFFER1598612621100",
"amount": 5000,
"providerCode": "MKT",
"transactionId": "145688247534499"
}
'
Response
{
"responseCode": "00",
"responseMessage": "Transaction Successful",
"transactionRef": "UBN|WEB|ILS|20170501091282|01238797",
"transactionId": "198988747587875"
}
Process flow for lenders with a channel
Step 1: Verify customer account number
Verify the accuracy of the customer's bank account details to prevent any errors in loan disbursement. This is to ensure you are not sending the funds to the wrong person/account or to ensure the account number is valid.
Request:
curl --request GET \
--url https://sandbox.interswitchng.com/api/v1/inquiry/bank-code/SORT_CODE/account/ACCOUNT_NUMBER \
--header 'accept: application/json' \
--header 'authorization: Bearer 9090909'
Response:
{
"responseCode": "00",
"responseMessage": "Successful",
"bvn": "12345678901",
"accountNumber": "0987654321",
"accountName": "JOHN JUNIOR DOE",
"bankCode": "058",
"firstName": "JOHN",
"lastName": "DOE",
"dob": "“01-Jan-70",
"phone": "08012345678",
"residentialAddress": "8 MARS FLAT,JOHNSON CRES. IKORODU ROAD LAGOS STATE"
}
Step 2: Confirm the customer's credit score
Request the credit score endpoint. This endpoint returns the customer’s current credit score generated by the credit score engine for the customer.
Request:
curl https://sandbox.interswitchng.com//v1/credit-score?msisdn=2348123456789 \
-H "Authorization: <token>" \
-H "Content-Type: application/json"
-X GET
Response:
{
“responseCode”: “00”,
“responseDescription”: “Successful”,
“creditScores”: [
{
“id”: 487,
“msisdn”: “2348123456789”,
“score”: “32”,
“dateCreated”: “2020-09-04”
}
]
}
Step 3: Send funds to the customer account
If the customer qualifies for a loan, use the Funds transfer endpoint. to directly transfer funds to the customer's bank account.
Request:
curl --request POST \
--url https://sandbox.interswitchng.com/lending-service/api/v1/payments/transfer \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsiY2FyZGxlc3Mtc2VydmljZSIsImluY29nbml0byIsImlzdy1jb2xsZWN0aW9ucyIsImlzdy1jb3JlIiwiaXN3LWxlbmRpbmctc2VydmljZSIsImlzdy1wYXltZW50Z2F0ZXdheSIsInBhc3Nwb3J0IiwicGF5bWVudC1zZXJ2aWNlIiwicHJvamVjdC14LW1lcmNoYW50IiwidmF1bHQiXSwibWVyY2hhbnRfY29kZSI6Ik1YMTg3IiwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwMDE2NDYzOTg1NCIsInJlcXVlc3Rvcl9pZCI6IjAwMTE3NjE0OTkyIiwic2NvcGUiOlsicHJvZmlsZSJdLCJqdGkiOiIzNTFjNDQ5MS01YzcwLTRhOTEtODRiZS0zZjNjY2Q1YzE2Y2MiLCJwYXlhYmxlX2lkIjoiMjMyNCIsImNsaWVudF9pZCI6IklLSUE5NjE0QjgyMDY0RDYzMkU5QjY0MThERjM1OEE2QTRBRUE4NEQ3MjE4IiwicGF5bWVudF9jb2RlIjoiMDQyNTk0MTMwMjQ2In0.P2mUITLA2bsmMryCyuVwDXK-4ozcRYtEKIN1t-qRPZaUStKleLsgxQxJqXv0EZ0CIYbAECw28AeJmbiBtosVSQ824unhfYTyhRCAt1olO_pNwf6PPmMNVTUO5q7F1b3CQPKP5D3VmNMw3MrHUzTzLwqMMzTIAYWf3V-7TEuHBOVzTsOtmuV-j63qASkFGsn_3x-TwgPVeOZ-INnDtXnSCSwQKG10q0_QE7B-ke2v0Up0vxXJ4wTsX8qWm6sJ5Bn_GU260qNPnVCip93xhzAHv7e__ONfeTMdDVPypQ0lyKgcR0FcBrJqONz6yifuu2BfoGeDkXV1cyZFhZg_xwiFYw' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"customerId": "2348123456789",
"amount": 100000,
"currencyCode": "566",
"accountNumber": "0724770668",
"accountType": "10",
"bankCode": "044",
"transactionId": "145328747580025",
"qtTerminalId": "3PBL",
"providerCode": "RPC",
"loanId": "KH:9090",
"loanReferenceId": "KHJ"
}
'
Step 4: Collect payment from the customer at the loan due date
To collect payments from the customer make a call to the Do Payment endpoint.
Request:
curl --request POST \
--url https://sandbox.interswitchng.com/lending-service/api/v1/payments \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsiY2FyZGxlc3Mtc2VydmljZSIsImluY29nbml0byIsImlzdy1jb2xsZWN0aW9ucyIsImlzdy1jb3JlIiwiaXN3LWxlbmRpbmctc2VydmljZSIsImlzdy1wYXltZW50Z2F0ZXdheSIsInBhc3Nwb3J0IiwicGF5bWVudC1zZXJ2aWNlIiwicHJvamVjdC14LW1lcmNoYW50IiwidmF1bHQiXSwibWVyY2hhbnRfY29kZSI6Ik1YMTg3IiwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwMDE2NDYzOTg1NCIsInJlcXVlc3Rvcl9pZCI6IjAwMTE3NjE0OTkyIiwic2NvcGUiOlsicHJvZmlsZSJdLCJqdGkiOiIzNTFjNDQ5MS01YzcwLTRhOTEtODRiZS0zZjNjY2Q1YzE2Y2MiLCJwYXlhYmxlX2lkIjoiMjMyNCIsImNsaWVudF9pZCI6IklLSUE5NjE0QjgyMDY0RDYzMkU5QjY0MThERjM1OEE2QTRBRUE4NEQ3MjE4IiwicGF5bWVudF9jb2RlIjoiMDQyNTk0MTMwMjQ2In0.P2mUITLA2bsmMryCyuVwDXK-4ozcRYtEKIN1t-qRPZaUStKleLsgxQxJqXv0EZ0CIYbAECw28AeJmbiBtosVSQ824unhfYTyhRCAt1olO_pNwf6PPmMNVTUO5q7F1b3CQPKP5D3VmNMw3MrHUzTzLwqMMzTIAYWf3V-7TEuHBOVzTsOtmuV-j63qASkFGsn_3x-TwgPVeOZ-INnDtXnSCSwQKG10q0_QE7B-ke2v0Up0vxXJ4wTsX8qWm6sJ5Bn_GU260qNPnVCip93xhzAHv7e__ONfeTMdDVPypQ0lyKgcR0FcBrJqONz6yifuu2BfoGeDkXV1cyZFhZg_xwiFYw' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"customerId": "\"customerId\": \"2348123456789\",",
"token": "5123453761522558",
"amount": "1000",
"providerCode": "MKT",
"currencyCode": "566",
"transactionId": "123456776",
"tokenExpiryDate": "2209"
}
'
Response:
{
"responseCode": "00",
"responseDescription": "Successful",
"transactionRef": "UBN|WEB|ILS|20170501120945|0198849"
}
If you want your customers to make repayments using Quickteller, you can use the Channel Collections Provider endpoint
Update Loan Status
In a scenario, where a user makes payment directly to the provider and they wish to sync the status of the loan on the service with theirs, a call can be made to Update Loan Status.
2- Channel Partner Integration
There are two methods of channel partner integration.
- PCI-DSS Licensed Channel Partner + Market Place of Loan Providers
- Non-PCIDSS Licensed Channel Partner + Market Place of Loan Providers
Process flow for PCI-DSS licensed channel partners
Disbursement
Step 1: Fetch loan providers
Make a call to the Get Providers endpoint. This will list the available loan providers.
Request
curl --request GET \
--url 'https://sandbox.interswitchng.com/lending-service/api/v1/offers/providers?channelCode=QTUSSD&serviceType=service%20type' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsiY2FyZGxlc3Mtc2VydmljZSIsImluY29nbml0byIsImlzdy1jb2xsZWN0aW9ucyIsImlzdy1jb3JlIiwiaXN3LWxlbmRpbmctc2VydmljZSIsImlzdy1wYXltZW50Z2F0ZXdheSIsInBhc3Nwb3J0IiwicGF5bWVudC1zZXJ2aWNlIiwicHJvamVjdC14LW1lcmNoYW50IiwidmF1bHQiXSwibWVyY2hhbnRfY29kZSI6Ik1YMTg3IiwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwMDE2NDYzOTg1NCIsInJlcXVlc3Rvcl9pZCI6IjAwMTE3NjE0OTkyIiwic2NvcGUiOlsicHJvZmlsZSJdLCJqdGkiOiIzNTFjNDQ5MS01YzcwLTRhOTEtODRiZS0zZjNjY2Q1YzE2Y2MiLCJwYXlhYmxlX2lkIjoiMjMyNCIsImNsaWVudF9pZCI6IklLSUE5NjE0QjgyMDY0RDYzMkU5QjY0MThERjM1OEE2QTRBRUE4NEQ3MjE4IiwicGF5bWVudF9jb2RlIjoiMDQyNTk0MTMwMjQ2In0.P2mUITLA2bsmMryCyuVwDXK-4ozcRYtEKIN1t-qRPZaUStKleLsgxQxJqXv0EZ0CIYbAECw28AeJmbiBtosVSQ824unhfYTyhRCAt1olO_pNwf6PPmMNVTUO5q7F1b3CQPKP5D3VmNMw3MrHUzTzLwqMMzTIAYWf3V-7TEuHBOVzTsOtmuV-j63qASkFGsn_3x-TwgPVeOZ-INnDtXnSCSwQKG10q0_QE7B-ke2v0Up0vxXJ4wTsX8qWm6sJ5Bn_GU260qNPnVCip93xhzAHv7e__ONfeTMdDVPypQ0lyKgcR0FcBrJqONz6yifuu2BfoGeDkXV1cyZFhZg_xwiFYw' \
--header 'accept: application/json'
Response
{
"responseCode": "104",
"responseMessage": "Invalid service type"
}
Step 2: Fetch loan offers
Call the Get Offers or Get Multiple Provider Offers endpoint to retrieve a list of available loan offers for the customer to choose from.
Request
curl --request GET \
--url 'https://sandbox.interswitchng.com/lending-service/api/v3/offers?customerId=2348123456789&channelCode=QTUSSD&amount=5000000&serviceType=MONEY&bvn=90909&dateOfBirth=1998-08-08&providerCode=MKT' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsiY2FyZGxlc3Mtc2VydmljZSIsImluY29nbml0byIsImlzdy1jb2xsZWN0aW9ucyIsImlzdy1jb3JlIiwiaXN3LWxlbmRpbmctc2VydmljZSIsImlzdy1wYXltZW50Z2F0ZXdheSIsInBhc3Nwb3J0IiwicGF5bWVudC1zZXJ2aWNlIiwicHJvamVjdC14LW1lcmNoYW50IiwidmF1bHQiXSwibWVyY2hhbnRfY29kZSI6Ik1YMTg3IiwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwMDE2NDYzOTg1NCIsInJlcXVlc3Rvcl9pZCI6IjAwMTE3NjE0OTkyIiwic2NvcGUiOlsicHJvZmlsZSJdLCJqdGkiOiIzNTFjNDQ5MS01YzcwLTRhOTEtODRiZS0zZjNjY2Q1YzE2Y2MiLCJwYXlhYmxlX2lkIjoiMjMyNCIsImNsaWVudF9pZCI6IklLSUE5NjE0QjgyMDY0RDYzMkU5QjY0MThERjM1OEE2QTRBRUE4NEQ3MjE4IiwicGF5bWVudF9jb2RlIjoiMDQyNTk0MTMwMjQ2In0.P2mUITLA2bsmMryCyuVwDXK-4ozcRYtEKIN1t-qRPZaUStKleLsgxQxJqXv0EZ0CIYbAECw28AeJmbiBtosVSQ824unhfYTyhRCAt1olO_pNwf6PPmMNVTUO5q7F1b3CQPKP5D3VmNMw3MrHUzTzLwqMMzTIAYWf3V-7TEuHBOVzTsOtmuV-j63qASkFGsn_3x-TwgPVeOZ-INnDtXnSCSwQKG10q0_QE7B-ke2v0Up0vxXJ4wTsX8qWm6sJ5Bn_GU260qNPnVCip93xhzAHv7e__ONfeTMdDVPypQ0lyKgcR0FcBrJqONz6yifuu2BfoGeDkXV1cyZFhZg_xwiFYw' \
--header 'accept: application/json'
curl --request GET \
--url 'https://sandbox.interswitchng.com/lending-service/api/v2/offers?customerId=2348123456789&channelCode=0002&fullname=John%20Doe&amount=amount&serviceType=serviceType' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsiY2FyZGxlc3Mtc2VydmljZSIsImluY29nbml0byIsImlzdy1jb2xsZWN0aW9ucyIsImlzdy1jb3JlIiwiaXN3LWxlbmRpbmctc2VydmljZSIsImlzdy1wYXltZW50Z2F0ZXdheSIsInBhc3Nwb3J0IiwicGF5bWVudC1zZXJ2aWNlIiwicHJvamVjdC14LW1lcmNoYW50IiwidmF1bHQiXSwibWVyY2hhbnRfY29kZSI6Ik1YMTg3IiwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwMDE2NDYzOTg1NCIsInJlcXVlc3Rvcl9pZCI6IjAwMTE3NjE0OTkyIiwic2NvcGUiOlsicHJvZmlsZSJdLCJqdGkiOiIzNTFjNDQ5MS01YzcwLTRhOTEtODRiZS0zZjNjY2Q1YzE2Y2MiLCJwYXlhYmxlX2lkIjoiMjMyNCIsImNsaWVudF9pZCI6IklLSUE5NjE0QjgyMDY0RDYzMkU5QjY0MThERjM1OEE2QTRBRUE4NEQ3MjE4IiwicGF5bWVudF9jb2RlIjoiMDQyNTk0MTMwMjQ2In0.P2mUITLA2bsmMryCyuVwDXK-4ozcRYtEKIN1t-qRPZaUStKleLsgxQxJqXv0EZ0CIYbAECw28AeJmbiBtosVSQ824unhfYTyhRCAt1olO_pNwf6PPmMNVTUO5q7F1b3CQPKP5D3VmNMw3MrHUzTzLwqMMzTIAYWf3V-7TEuHBOVzTsOtmuV-j63qASkFGsn_3x-TwgPVeOZ-INnDtXnSCSwQKG10q0_QE7B-ke2v0Up0vxXJ4wTsX8qWm6sJ5Bn_GU260qNPnVCip93xhzAHv7e__ONfeTMdDVPypQ0lyKgcR0FcBrJqONz6yifuu2BfoGeDkXV1cyZFhZg_xwiFYw' \
--header 'accept: application/json'
Response
{
"responseCode": "00",
"responseMessage": "Offers available",
"offers": [
{
"offerId": "FI12345",
"amountOffered": 1000000, // Ten thousand naira only
"interest" : 12.5 // In percentage: 12.5%
"amountPayable": 1250000, // Ten thousand, two hundred and fifty naira only
"tenure": 30,
"expiryDate": "2017-05-30T16:49:12Z",
"currency": "566"
}
]
}
{
"responseCode": "00",
"offers": [
{
"offerId": "OFFER1511245980103",
"amountOffered": 3500000,
"interest": 15,
"amountPayable": 3875000,
"tenure": 14,
"expiryDate": "2017-06-30T09:24:09Z",
"currency": "566",
"description": "N35000 to pay N3875000 in 14 days",
"provider": {
"code": "MKT",
"name": "MKT Loans",
"description": "MKT"
}
}
]
}
Step 3:
After the customer selects an offer, make a call to Get Payment Methods to check if the customer has the payment instrument in their payphone wallet and the validity of the payment instrument.
What is a payment intrument ?
A payment instrument is a method or tool used to facilitate the transfer of money or value between parties e.g payment cards(debit cards andcredit cards) , cheques. The payment instrument that is our focus in this module is payment card.
Request
curl --request GET \
--url 'https://sandbox.interswitchng.com/lending-service/api/v1/users/2348161286594/payment-methods?channelCode=QTUSSD' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsiY2FyZGxlc3Mtc2VydmljZSIsImluY29nbml0byIsImlzdy1jb2xsZWN0aW9ucyIsImlzdy1jb3JlIiwiaXN3LWxlbmRpbmctc2VydmljZSIsImlzdy1wYXltZW50Z2F0ZXdheSIsInBhc3Nwb3J0IiwicGF5bWVudC1zZXJ2aWNlIiwicHJvamVjdC14LW1lcmNoYW50IiwidmF1bHQiXSwibWVyY2hhbnRfY29kZSI6Ik1YMTg3IiwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwMDE2NDYzOTg1NCIsInJlcXVlc3Rvcl9pZCI6IjAwMTE3NjE0OTkyIiwic2NvcGUiOlsicHJvZmlsZSJdLCJqdGkiOiIzNTFjNDQ5MS01YzcwLTRhOTEtODRiZS0zZjNjY2Q1YzE2Y2MiLCJwYXlhYmxlX2lkIjoiMjMyNCIsImNsaWVudF9pZCI6IklLSUE5NjE0QjgyMDY0RDYzMkU5QjY0MThERjM1OEE2QTRBRUE4NEQ3MjE4IiwicGF5bWVudF9jb2RlIjoiMDQyNTk0MTMwMjQ2In0.P2mUITLA2bsmMryCyuVwDXK-4ozcRYtEKIN1t-qRPZaUStKleLsgxQxJqXv0EZ0CIYbAECw28AeJmbiBtosVSQ824unhfYTyhRCAt1olO_pNwf6PPmMNVTUO5q7F1b3CQPKP5D3VmNMw3MrHUzTzLwqMMzTIAYWf3V-7TEuHBOVzTsOtmuV-j63qASkFGsn_3x-TwgPVeOZ-INnDtXnSCSwQKG10q0_QE7B-ke2v0Up0vxXJ4wTsX8qWm6sJ5Bn_GU260qNPnVCip93xhzAHv7e__ONfeTMdDVPypQ0lyKgcR0FcBrJqONz6yifuu2BfoGeDkXV1cyZFhZg_xwiFYw' \
--header 'accept: application/json'
Response
{
“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”
}
]
}
Step 4: Collect customer card details
Collect customer card details to accept the loan.
Step 5: Implement two-factor authentication
Enable two-factor authentication by calling Get Token With Token Validation endpoint followed by the Complete Get Token With OTP endpoint.
Request
curl --request POST \
--url https://sandbox.interswitchng.com/lending-service/api/v2/payments/token \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsiY2FyZGxlc3Mtc2VydmljZSIsImluY29nbml0byIsImlzdy1jb2xsZWN0aW9ucyIsImlzdy1jb3JlIiwiaXN3LWxlbmRpbmctc2VydmljZSIsImlzdy1wYXltZW50Z2F0ZXdheSIsInBhc3Nwb3J0IiwicGF5bWVudC1zZXJ2aWNlIiwicHJvamVjdC14LW1lcmNoYW50IiwidmF1bHQiXSwibWVyY2hhbnRfY29kZSI6Ik1YMTg3IiwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwMDE2NDYzOTg1NCIsInJlcXVlc3Rvcl9pZCI6IjAwMTE3NjE0OTkyIiwic2NvcGUiOlsicHJvZmlsZSJdLCJqdGkiOiIzNTFjNDQ5MS01YzcwLTRhOTEtODRiZS0zZjNjY2Q1YzE2Y2MiLCJwYXlhYmxlX2lkIjoiMjMyNCIsImNsaWVudF9pZCI6IklLSUE5NjE0QjgyMDY0RDYzMkU5QjY0MThERjM1OEE2QTRBRUE4NEQ3MjE4IiwicGF5bWVudF9jb2RlIjoiMDQyNTk0MTMwMjQ2In0.P2mUITLA2bsmMryCyuVwDXK-4ozcRYtEKIN1t-qRPZaUStKleLsgxQxJqXv0EZ0CIYbAECw28AeJmbiBtosVSQ824unhfYTyhRCAt1olO_pNwf6PPmMNVTUO5q7F1b3CQPKP5D3VmNMw3MrHUzTzLwqMMzTIAYWf3V-7TEuHBOVzTsOtmuV-j63qASkFGsn_3x-TwgPVeOZ-INnDtXnSCSwQKG10q0_QE7B-ke2v0Up0vxXJ4wTsX8qWm6sJ5Bn_GU260qNPnVCip93xhzAHv7e__ONfeTMdDVPypQ0lyKgcR0FcBrJqONz6yifuu2BfoGeDkXV1cyZFhZg_xwiFYw' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"customerId": "2349095801772",
"authData": "RTojFURS9D1MDZ7gb6y7ych4ReHzoLr9AdIsqpZO4fj/huSyi+wDTig1ORaguhKkxm4NJLInJaFKKImKSSK0dG3cLqIiHnKL8RJdKCyvB74ku1P1l4MmQm+PrheYzjR8D6iBgGi9LMnTWxQajcnvnKMwl3FjjXHWDVB7lkWhk6KjATg4iEd7pZ1Y5frHYMsdMWGOQlzkIVRbVXcAKaHPqGlGIBNFPDbJxpME8KUp1f/QoqoJ/ryipa5oBVX3o2Z/p1YMAuWETxv3FFk39omKYZmh21uC+i2pgvBeg3T8bjqc5jFpA0Qxejj1uBWTwkUtzqvCUQxSSRIlfN2UEUOF8Q==",
"transactionRef": "15345574890",
"providerCode": "MKT"
}
'
curl --request POST \
--url https://sandbox.interswitchng.com/lending-service/api/v2/payments/token/validate \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsiY2FyZGxlc3Mtc2VydmljZSIsImluY29nbml0byIsImlzdy1jb2xsZWN0aW9ucyIsImlzdy1jb3JlIiwiaXN3LWxlbmRpbmctc2VydmljZSIsImlzdy1wYXltZW50Z2F0ZXdheSIsInBhc3Nwb3J0IiwicGF5bWVudC1zZXJ2aWNlIiwicHJvamVjdC14LW1lcmNoYW50IiwidmF1bHQiXSwibWVyY2hhbnRfY29kZSI6Ik1YMTg3IiwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwMDE2NDYzOTg1NCIsInJlcXVlc3Rvcl9pZCI6IjAwMTE3NjE0OTkyIiwic2NvcGUiOlsicHJvZmlsZSJdLCJqdGkiOiIzNTFjNDQ5MS01YzcwLTRhOTEtODRiZS0zZjNjY2Q1YzE2Y2MiLCJwYXlhYmxlX2lkIjoiMjMyNCIsImNsaWVudF9pZCI6IklLSUE5NjE0QjgyMDY0RDYzMkU5QjY0MThERjM1OEE2QTRBRUE4NEQ3MjE4IiwicGF5bWVudF9jb2RlIjoiMDQyNTk0MTMwMjQ2In0.P2mUITLA2bsmMryCyuVwDXK-4ozcRYtEKIN1t-qRPZaUStKleLsgxQxJqXv0EZ0CIYbAECw28AeJmbiBtosVSQ824unhfYTyhRCAt1olO_pNwf6PPmMNVTUO5q7F1b3CQPKP5D3VmNMw3MrHUzTzLwqMMzTIAYWf3V-7TEuHBOVzTsOtmuV-j63qASkFGsn_3x-TwgPVeOZ-INnDtXnSCSwQKG10q0_QE7B-ke2v0Up0vxXJ4wTsX8qWm6sJ5Bn_GU260qNPnVCip93xhzAHv7e__ONfeTMdDVPypQ0lyKgcR0FcBrJqONz6yifuu2BfoGeDkXV1cyZFhZg_xwiFYw' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"customerId": "2349095801772",
"authData": "RTojFURS9D1MDZ7gb6y7ych4ReHzoLr9AdIsqpZO4fj/huSyi+wDTig1ORaguhKkxm4NJLInJaFKKImKSSK0dG3cLqIiHnKL8RJdKCyvB74ku1P1l4MmQm+PrheYzjR8D6iBgGi9LMnTWxQajcnvnKMwl3FjjXHWDVB7lkWhk6KjATg4iEd7pZ1Y5frHYMsdMWGOQlzkIVRbVXcAKaHPqGlGIBNFPDbJxpME8KUp1f/QoqoJ/ryipa5oBVX3o2Z/p1YMAuWETxv3FFk39omKYZmh21uC+i2pgvBeg3T8bjqc5jFpA0Qxejj1uBWTwkUtzqvCUQxSSRIlfN2UEUOF8Q==",
"otp": "770391",
"transactionRef": "15345574890",
"providerCode": "MKT"
}
'
Response
{
“transactionRef”: “1234566”,
“responseCode”: “T0”,
“message”: “Kindly enter the OTP sent to 234812***8436 and dadub************itch.com”
}
{
“cardType”: “Verve”,
“token”: “5123450558220138603”,
“tokenExpiry”: “0420”,
“transactionRef” : “1234566”,
“panLast4Digits”: “7499”
}
Step 6: Customer accepts offer
Upon the customer's selection of your offer, make an API request to the Accept offer endpoint to complete the acceptance process.
Request:
curl --request POST \
--url https://sandbox.interswitchng.com/lending-service/api/v1/offers/xxxxxx9090/accept \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsiY2FyZGxlc3Mtc2VydmljZSIsImluY29nbml0byIsImlzdy1jb2xsZWN0aW9ucyIsImlzdy1jb3JlIiwiaXN3LWxlbmRpbmctc2VydmljZSIsImlzdy1wYXltZW50Z2F0ZXdheSIsInBhc3Nwb3J0IiwicGF5bWVudC1zZXJ2aWNlIiwicHJvamVjdC14LW1lcmNoYW50IiwidmF1bHQiXSwibWVyY2hhbnRfY29kZSI6Ik1YMTg3IiwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwMDE2NDYzOTg1NCIsInJlcXVlc3Rvcl9pZCI6IjAwMTE3NjE0OTkyIiwic2NvcGUiOlsicHJvZmlsZSJdLCJqdGkiOiIzNTFjNDQ5MS01YzcwLTRhOTEtODRiZS0zZjNjY2Q1YzE2Y2MiLCJwYXlhYmxlX2lkIjoiMjMyNCIsImNsaWVudF9pZCI6IklLSUE5NjE0QjgyMDY0RDYzMkU5QjY0MThERjM1OEE2QTRBRUE4NEQ3MjE4IiwicGF5bWVudF9jb2RlIjoiMDQyNTk0MTMwMjQ2In0.P2mUITLA2bsmMryCyuVwDXK-4ozcRYtEKIN1t-qRPZaUStKleLsgxQxJqXv0EZ0CIYbAECw28AeJmbiBtosVSQ824unhfYTyhRCAt1olO_pNwf6PPmMNVTUO5q7F1b3CQPKP5D3VmNMw3MrHUzTzLwqMMzTIAYWf3V-7TEuHBOVzTsOtmuV-j63qASkFGsn_3x-TwgPVeOZ-INnDtXnSCSwQKG10q0_QE7B-ke2v0Up0vxXJ4wTsX8qWm6sJ5Bn_GU260qNPnVCip93xhzAHv7e__ONfeTMdDVPypQ0lyKgcR0FcBrJqONz6yifuu2BfoGeDkXV1cyZFhZg_xwiFYw' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"customerId": "234000000000000",
"offerId": "KB9090",
"destinationAccountNumber": "09999222",
"destinationBankCode": "044",
"token": "9202020",
"loanReferenceId": "KBPOB60"
}
'
Response:
{
“responseCode”: “00”,
“responseMessage”: “Successful”
“loanId”:”0329”
}
Collection
Step 1: Confirm the customer loan lists
Use the Get customer status endpoint to verify whether the customer currently has an active loan or is managing other existing loans.
Request
curl --request GET \
--url 'https://sandbox.interswitchng.com/lending-service/api/v1/users/2348123456789/status?channelCode=QTUSSD&strict=true' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsiY2FyZGxlc3Mtc2VydmljZSIsImluY29nbml0byIsImlzdy1jb2xsZWN0aW9ucyIsImlzdy1jb3JlIiwiaXN3LWxlbmRpbmctc2VydmljZSIsImlzdy1wYXltZW50Z2F0ZXdheSIsInBhc3Nwb3J0IiwicGF5bWVudC1zZXJ2aWNlIiwicHJvamVjdC14LW1lcmNoYW50IiwidmF1bHQiXSwibWVyY2hhbnRfY29kZSI6Ik1YMTg3IiwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwMDE2NDYzOTg1NCIsInJlcXVlc3Rvcl9pZCI6IjAwMTE3NjE0OTkyIiwic2NvcGUiOlsicHJvZmlsZSJdLCJqdGkiOiIzNTFjNDQ5MS01YzcwLTRhOTEtODRiZS0zZjNjY2Q1YzE2Y2MiLCJwYXlhYmxlX2lkIjoiMjMyNCIsImNsaWVudF9pZCI6IklLSUE5NjE0QjgyMDY0RDYzMkU5QjY0MThERjM1OEE2QTRBRUE4NEQ3MjE4IiwicGF5bWVudF9jb2RlIjoiMDQyNTk0MTMwMjQ2In0.P2mUITLA2bsmMryCyuVwDXK-4ozcRYtEKIN1t-qRPZaUStKleLsgxQxJqXv0EZ0CIYbAECw28AeJmbiBtosVSQ824unhfYTyhRCAt1olO_pNwf6PPmMNVTUO5q7F1b3CQPKP5D3VmNMw3MrHUzTzLwqMMzTIAYWf3V-7TEuHBOVzTsOtmuV-j63qASkFGsn_3x-TwgPVeOZ-INnDtXnSCSwQKG10q0_QE7B-ke2v0Up0vxXJ4wTsX8qWm6sJ5Bn_GU260qNPnVCip93xhzAHv7e__ONfeTMdDVPypQ0lyKgcR0FcBrJqONz6yifuu2BfoGeDkXV1cyZFhZg_xwiFYw' \
--header 'accept: application/json'
Response
{
“responseCode”: “00”,
“responseMessage”: “Successful”,
“loans”: [
{
“id”: 159,
“offerId”: “0001”,
“customerId”: “2348124888436”,
“providerId”: 205,
“providerCode”: “ABC”,
“channelId”: 1,
“channelCode”: “CHONE”,
“status”: “Open”,
“amount”: 100000,
“amountPayable”: 110000,
“tenure”: 30,
“dueDate”: null.
“terms”: “Please read the terms and conditions on https://onefi.com/terms”,
“currency”: “566”,
“customerDebitMethod”: 80,
“customerCreditMethod”: 52,
“providerLoanId”: “0001”,
“interest”: 12.5,
“dateCreated”: 1496420509847
}
]
}
Step 2: Get the customer loan status
Use the Get Loan Status endpoint to retrieve details about a specific loan from the customer's list of loans.
curl --request GET \
--url 'https://lender.com/endpoint/10000000058?customerId=2348123456789&loanId=KB%3A90909&providerCode=PTB&channelCode=QTUSSD' \
--header 'accept: application/json' \
--header 'password: passsword' \
--header 'username: john'
{
“responseCode”: “00”,
“responseMessage”: “Successful”,
“loan”: {
“status”: “OPEN”,
“remainingAmount”: “0.00”,
“dueDate”: “2017-06-12T11:46:15Z”
}
Step 3: Initiate a Collect payment from the customer at the loan due date
To collect payments from the customer, make a call to the Debit Customer endpoint.
Request
curl --request POST \
--url https://sandbox.interswitchng.com/lending-service/api/v1/loans/OFFER1598612621100/debit \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsiY2FyZGxlc3Mtc2VydmljZSIsImluY29nbml0byIsImlzdy1jb2xsZWN0aW9ucyIsImlzdy1jb3JlIiwiaXN3LWxlbmRpbmctc2VydmljZSIsImlzdy1wYXltZW50Z2F0ZXdheSIsInBhc3Nwb3J0IiwicGF5bWVudC1zZXJ2aWNlIiwicHJvamVjdC14LW1lcmNoYW50IiwidmF1bHQiXSwibWVyY2hhbnRfY29kZSI6Ik1YMTg3IiwicHJvZHVjdGlvbl9wYXltZW50X2NvZGUiOiIwMDE2NDYzOTg1NCIsInJlcXVlc3Rvcl9pZCI6IjAwMTE3NjE0OTkyIiwic2NvcGUiOlsicHJvZmlsZSJdLCJqdGkiOiIzNTFjNDQ5MS01YzcwLTRhOTEtODRiZS0zZjNjY2Q1YzE2Y2MiLCJwYXlhYmxlX2lkIjoiMjMyNCIsImNsaWVudF9pZCI6IklLSUE5NjE0QjgyMDY0RDYzMkU5QjY0MThERjM1OEE2QTRBRUE4NEQ3MjE4IiwicGF5bWVudF9jb2RlIjoiMDQyNTk0MTMwMjQ2In0.P2mUITLA2bsmMryCyuVwDXK-4ozcRYtEKIN1t-qRPZaUStKleLsgxQxJqXv0EZ0CIYbAECw28AeJmbiBtosVSQ824unhfYTyhRCAt1olO_pNwf6PPmMNVTUO5q7F1b3CQPKP5D3VmNMw3MrHUzTzLwqMMzTIAYWf3V-7TEuHBOVzTsOtmuV-j63qASkFGsn_3x-TwgPVeOZ-INnDtXnSCSwQKG10q0_QE7B-ke2v0Up0vxXJ4wTsX8qWm6sJ5Bn_GU260qNPnVCip93xhzAHv7e__ONfeTMdDVPypQ0lyKgcR0FcBrJqONz6yifuu2BfoGeDkXV1cyZFhZg_xwiFYw' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"customerId": "2348123456789",
"loanId": "OFFER1598612621100",
"amount": 5000,
"providerCode": "MKT",
"transactionId": "145688247534499"
}
'
Response
{
"responseCode": "00",
"responseMessage": "Transaction Successful",
"transactionRef": "UBN|WEB|ILS|20170501091282|01238797",
"transactionId": "198988747587875"
}
Step 4: Send a payment notification to the customer
Following the collection of the loan payment from the customer, use the payment notification endpoint to send a message to the customer, informing them of the debit.
Request
curl --request POST \
--url https://lender.com/endpoint \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'password: doe' \
--header 'username: john ' \
--data '
{
"loanId": "KB90",
"paymentRef": "Trxfio",
"Amount": "9000",
"customerId": "CustomerId"
}
'
Response
{
"responseCode": "00",
"responseMessage": "Successful",
"loanStatus": "CLOSED"
}
For Non-PCIDSS licensed channel partners, the flow is same as the PCIDSS licensed asides the introduction of Hosted Fields
The flow charts below explain additional approaches for integrating channel partners.
- PCIDSS Licensed Channel Partner + Option to Specify Loan Providers
- Non PCIDSS Licensed Channel Partner + Option to Specify Loan Providers
Updated 9 months ago