1. Home
  2. Transfer Service Core API Documentation
  3. Transfer Service Core API

Transfer Service Core API

1. Authentication API


This API handles obtaining an access token for authentication

URL

base URI : https://sandbox.interswitchng.com/transfers

Access tokens for all grant types can be obtained from the following URL:

https://sandbox.interswitchng.com/passport/oauth/token

HTTP Verb: POST

Headers

The Authentication API endpoints require a Basic authorization header. In addition, the request body is sent as a URL encoded form. As a result, the following headers would be set:

Authorization: Basic <Base64Encoded string of client_id:client_secret>

Content-Type: application/x-www-form-urlencoded

Client Credentials Grant Type

Use this endpoint to get an access token using client credentials

Request Body

FieldTypeRequired
grant_typeStringRequired
scopeStringOptional

Sample Request Body

grant_type=client_credentials&scope=profile

Response

FieldDescription
access_tokenThe access token that would be used to consume the secure apis
expires_inThe time this token will expire in seconds. Ensure that the token is renewed at least 30 seconds before the token expires to prevent expiry in flight

Sample Response (success)

"access_token":"eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsicGFzc3BvcnQiXSwic2NvcGUiOlsicHJvZmlsZSJdLCJleHAiOjMwMTg1Mjk4ODksImp0aSI6IjBlYWYwMWIzLTM4M2QtNDFkNi1hOTgzLWI3OTIwNDU3ODBjMyIsImNsaWVudF9pZCI6InRlc3RjbGllbnQifQ.OaLlGSTLFHGu7553HNhzuBOIiQvdiNVNPAm5-opCq7JPugEG2ubPtLZLu2znr0aJkHR0BGiV2e9ZSrkp6cxYoT74SvY9b-2AE9giNdWpPgWMO6HqadL9re6ojkl9YU9uW_okjYUhTa-P_jOtWYUhbqi02SyUrN8m-SNI29IZPS-Q2J9Aq9zARiW7dVZWMBC8GHR_IL8V-GozaG782kIEUcBNfDGRnttV5qJwVpXomzyKlZDwEZKPOewh_1NVPvv7hDi79OfN63PiENvM4XLzDW9rFgKrRb6x43dpLfnoie1Id39eiCLGKX8ykrVEFg94jp1JCDpEDaexCcf05Dz5ag","token_type""bearer","expires_in"43199,"scope""profile","jti""0eaf01b3-383d-41d6-a983-b792045780c3"}

Sample Response (failure)

{"error""invalid_request","error_description""Missing grant type"}

2. Credit Inquiry Request


This endpoint receives a request to confirm if an account specified in destinationAccountNumber can be credited with a specified amount 

On the successful completion of a credit inquiry, the transaction is logged in Transfer service and awaits a completion update with the same client reference sent in the inquiry or the transaction reference returned in the inquiry response.

Endpoint

POST <base URI>/inquiries/credit


Headers

Authorization – Bearer {Passport Access Token}Content-Type: application/json


Request Message description

Field #Field nameData typeMax lengthClassificationDescription
1sourceAccountNumberString50MandatorySource Account number
2sourceAccountNameString200MandatorySource Account Name
2sourceBankVerificationNumberString100RecommendedSource Customer Bank Verification Number
3destinationAccountNumberString20MandatoryDestination Account Number
4destinationInstitutionCodeString3MandatoryInstitution code , one of the codes assigned in ISW core
5transactionAmountLongMAXMandatoryAmount in minor denomination
6currencyCodeString3MandatoryISO currency code ( ISO Numeric Code)
7clientRefString50MandatoryUnique reference per transaction
8mobileNumberString20OptionalInternationally formatted mobile number
9emailAddressString100OptionalCustomer Email Address
10paymentLocationStringMAXOptionalPayment Location
11channelCodeIntegerMAXMandatoryChannel ID. Channel Appendix below for channel definitions
12terminalIdString8OptionalTerminalID
13destinationInstitutionAliasStringOptionalInstitutions Alias. Can be used instead of destinationInstitutionCode
14mccString4OptionalThe classification of the merchant’s type of business product or service.
14rrnString12OptionalA reference number supplied by the system retaining the original source information and used to assist in locating that information or a copy thereof.
15paymentLocationString40OptionalThe name and location of the card acceptor (such as a merchant or an ATM). 

Response Message description

Field #Field nameData typeDescription
1responseCodeStringResponse Code
2responseMessageStringResponse Message
3accountNameStringAccount Name
4accountNumberStringAccount Number
5clientRefStringInitial reference sent by client if sent, or one auto generated by system
6transactionReferenceStringUnique transaction reference
7bankVerificationNumberStringBank Verification Number
8kycLevelStringKYC Level
9accountTypeStringCurrent, Savings or Credit
10accountCurrencyStringISO currency
11addressStringReceiver’s address.   At present this attribute will not be used for any further processing.
12countryCodeStringCountry code of the transaction. This is the ISO country code.
13canCreditBooleanIf the account validation is successful for credit this will be true. Note: If true allow customer to proceed to complete the credit otherwise, fail the transaction. This is usually because the account is dormant, or the account cannot receive the amount specified.
14systemResponseCodeStringSystem Response code that is sometimes included in response in case of exceptions in the system. This helps with issue resolution.
15actionStringAction on transaction as received from the middleware
16settlementStatusStatusSettlement status of  inquiry transaction. Default settlement status for Inquiry is NEW



Sample request

{
"destinationAccountNumber " "0123456789",
"sourceAccountNumber""8096080",
"sourceAccountName""Tolani Moshood",
"destinationInstitutionCode":"ABP",
"transactionAmount": 300000,
"currencyCode""566",
"clientRef" "abc1222223knkj",
"mobileNumber":"2348089546016",
"emailAddress" "siryaya@gmail.com",
"channelCode":2,    "paymentLocation": "PBL,T,10360057075012,Adubiaro, DeborLaNG"}
Sample Response (success)
HTTP Status: 200 
{"accountType": "SAVINGS","accountCurrency": "NGN","address": "1 AYANBOYE STREET ANTHONY KOSOFE LAGOS","responseCode": "00","responseMessage": "Approved or completed successfully","transactionReference": "CR|SUN|ABP|250720201707|237233","bankVerificationNumber": "1234565667","kycLevel": "1","canCredit": true,"settlementStatus": "NEW","action": "SUCCESS"}

Sample Response (invalid account)
HTTP Status: 409 Conflict{ "clientRef": "abc1222223knkj", "responseCode": "39", "responseMessage": "Invalid Account", "transactionReference": "CR|SUN|ABP|231120201142|244092", "canCredit": false, "action": "FAILURE" }

3. Account Credit Request With Credit Inquiry Reference or Transaction Reference


This endpoint receives a request to close an open credit inquiry by performing the credit transactionThe credit inquiry to be closed is contained in the clientRef field or transactionReference field. The transactionAmount to be credited is also included in the request.The request is processed and routed to the destination institution to effect the credit. The credit request is pushed for processing and a response is sent back to the calling application.

EndpointEndpoint

POST <base URI>/accounts/credits/completion

Headers

Authorization – Bearer {Passport Access Token}Content-Type: application/json


Request Message description

Field #Field nameData typeMax lengthClassificationDescription
1transactionAmountLongMAXMandatoryAmount in minor denomination
2narrationString200MandatoryNarration
3clientRefString50RequiredUnique reference per client. If present in inquiry, should be the same. N:B: You either client Ref or Transaction Reference in your payload but you cannot use both.
4additionalInfoStringMAXOptionalAdditional Information. Could contain initial debit details (e.g mobile app implementation)
5transactionReferenceString50RequiredTransaction Reference returned from credit inquiry.
N:B: You either client Ref or Transaction Reference in your payload but you cannot use both.

Response Message description

Field#Field nameDescription
1transactionReferenceUnique transaction reference
2responseCodeThe response code of the transaction see appendix for response code details
3responseMessageThe descriptive response message
4statusThe status of the transaction. See transaction status appendix. Use the status mappings to determine if the transaction succeeded or not.
5clientRefThe clientRef of the transaction
6systemResponseCodeSystem Response code that is sometimes included in response in case of exceptions in the system. This helps with issue resolution.
7settlementStatusSettlement status of the credit transaction

Sample Request one
{"transactionAmount": 300000,"clientRef" : "abc1222223knkj","additionalInfo":"{\"sourceBvn\":\"1111111\",\"sourceKycLevel\":\"1\"}","narration": "For your wedding"}

Sample Request two

{"transactionAmount": 300000,"transactionReference": "CR|SUN|ABP|250720201707|237233","additionalInfo":"{\"sourceBvn\":\"1111111\",\"sourceKycLevel\":\"1\"}","narration": "For your wedding"}

Sample Response (success)
HTTP Status: 200 {"responseCode""00","transactionReference""CR|FBN|DMD|28032019102410|4237","responseMessage""Approved by financial institution","status""SUCCESS","clientRef""1234-5678" ,"settlementStatus""SUCCESSFUL"}


4. Requery Transfer Request


This endpoint queries a transfer using the original clientRef and/or transactionReference returned by the Transfer Service.

EndpointEndpoint

POST <base URI>/transfers/accounts/credits/requery


Headers

Authorization – Bearer {Passport Access Token}Content-Type: application/json

Request Message description

Field#Field nameData typeMaxClassificationDescription
1clientRefString50 Optional (if transactionReference is provided) Unique reference per institution
2transactionReferenceString16Optional (if clientRef is provided)Unique transaction reference across institutions, generated and returned by TS

Response Message  field description

Field#Field nameDescription
1transactionReferenceUnique transaction reference
2responseCodeThe response code of the transaction see appendix for response code details
3responseMessageThe descriptive response message
4statusThe status of the transaction. See transaction status appendix. Use the status mappings to determine if the transaction succeeded or not.
5clientRefThe clientRef of the transaction
6settlementStatusSettlement status of the credit transaction
Sample Request With Transaction Reference
{
“transactionReference”: “CR|SUN|FBP|310520202047|226464”
}
Sample Request With Client Reference
{
“clientRef”: “SUN|ITF|NA|FBP|1235645654|98776”
}

Sample Response (success)

HTTP Status: 200{"responseCode""00","transactionReference""CR|SUN|FBP|310520202047|226464","responseMessage""Approved or completed successfully","status""SUCCESS","clientRef""SUN|ITF|NA|FBP|1235645654|98776","settlementStatus""SUCCESSFUL"}

List of Receiving Institutions

  1. Endpoint
GET <base URI> /transfers/institutions

Headers

Authorization – Bearer {Passport Access Token}
Content-Type: application/json

Query Parameters

Field#Field nameData type OptionDescription
1perPageIntegerOptional The number of institutions per page. The default value is 30 and the maximum value is 200
2pageInteger Optional The page number of the institutions to fetch.

Sample Request
GET host /transfers/institutions?perPage=200&page=1

Sample Response
HTTP 200 OK
{
“total”: 515,
“perPage”: 200,
“page”: 1,
“institutions”: [
{
“institutionId”: “1”,
“institutionCode”: “AAB”,
“institutionName”: “Actual African Bank”
},
{
“institutionId”: “2”,
“institutionCode”: “AGB”,
“institutionName”: “Actual Global Bank”
},

]
}

Request Message description

Field#Field nameData typeMaxClassificationDescription
1clientRefString50RequiredUnique reference per institution
2transactionReferenceString16Optional (if clientRef is provided)Unique transaction reference across institutions, generated and returned by TS

5. Appendix


Transaction Statuses

The status should be used to interprete the transaction response code for simplicity. These can be received during credit completion, requery, and transaction update callback.

StatusMeaning
SUCCESSTransaction approved and completed successfully. Credit hit beneficiary account realtime
FAILURETransaction failed permanently
TRANSACTION_IN_PROGRESSTransaction status is currently undergoing automated confirmation. Final response will be shared via a call to the requery API
PENDINGTransaction status unknown and cannot be confirmed from remote institution. Transaction will be settled and dealt with through the arbitration process if necessary. Please treat as SUCCESSFUL
NEWThis states that the Inquiry can be retried as the Inquiry request is yet to be completed
OPENTransaction Inquiry was successful and transaction is now open for a Credit request
ERRORTransaction is in a final state and a user is re-attempting to trigger a duplicate credit request. Recheck transaction details and try again

NOTE: The transaction STATUS gives a true picture of the transaction and should be paid attention to mostly. The response codes define the different scenarios that could happen around the transaction processing

Response Codes

Response CodeDescriptionResponse Message
00Transaction was successfulApproved or completed successfully
01Source institution should be contactedContact source institution
05Do not honourDo not honour
06Transaction failed for arbitrary reasonsGeneral transaction failure
09Transaction is in progress at middleware or other operational reasons.Transaction in progress
10CBA timeout at destinationTransaction in progress
12The transaction is invalidInvalid Transaction
13Invalid AmountInvalid Amount
14The account type for this account is invalidAccount type is incorrect
15No such issuerInvalid Issuer
17Middleware error returned for operations relating to customer authenticating the debitDebit Authentication Error
19Transaction retry limit has been reached. The middleware will no longer attempt this transaction. Except a requery and it receives a response code for which it can retry.Pending transaction retry limit reached and status unknown
20Invalid response received from processorInvalid response received from CBA
21Middleware received a response code that is not in its mapping configuration tableResponse code not registered
25Transaction record not foundTransaction not found
30Bad requestBad request
31Invalid route configuration for senderRoute configuration error for issuer institution
39The specified account does not existInvalid account
40The sender account is invalidSender invalid
45The specified account is closedAccount is closed
46The specified account is dormantAccount is dormant
47The specified account is blockedAccount is blocked
51The specified account balance has been reachedAccount balance limit reached
52The TSS at the crediting bank is not sufficiently fundedTransaction failed. Please contact administrator
56Payment instrument not found to complete transactionPayment Instrument not found
58Transaction not allowed on channel specified/ Channel code has not been mapped/setup on the middleware or is inactive. No further action was taken.Transaction not permitted on channel /Channel does not exist
59The transaction is marked as suspected fraud and not processedSuspected fraud or security breach
61Transaction limit exceededSource transfer limit exceeded
62Withdrawal frequency exceededWithdrawal frequency exceeded
63Security has been violatedSecurity Violation
64Authentication token is not validAuthentication token is not valid
79Bvn record not maintainedAccount no bvn maintained
80Account name mismatchAccount name mismatch
81The configured TSS is invalid (does not exist, PND, etc)Invalid TSS account
82The configured TSS could not be creditedCannot credit TSS account
91Middleware could not reach Core Banking Application / Middleware did not get a definite response from Core Banking ApplicationCould not reach Remote Service / Response timed out while attempting to reach remote service
92Invalid route configuration for destinationIssue/Error with routing configuration for the receiving institution
94Transaction is a duplicate and is either in progress Duplicate transaction
97A system error occurred. Transaction status not confirmed.A system error occurred. Transaction status not confirmed.
98The specified account has reached the limit for this transactionAccount transaction limit reached
99The transfer rate limit has been reached for the TSS account.Transfer frequency reached

Channel Codes

Channel CodeDescription
1BANK BRANCH
2WEB
3DIRECT DEBIT
4ATM
5POS
6MOBILE
Was this article helpful to you? Yes 1 No

How can we help?