This API is used to retrieve the balance of a Payment Method through Payphone to Switch. This API requires the Card be saved on the User’s wallet.
.
Resource Url
n?scheme={scheme}&channel={channel}&merchantid={merchantId}&version=5.0
GetBalance Request
The following describes the element required to be sent for a request.
Field | Description | Required |
subscriberId | subscriberId | Yes |
merchantId | The verve wallet merchantId | Yes |
transactionType | transactionType | Yes |
scheme | The verve wallet scheme owner | Yes |
Ttid | Terminal Transaction ID | Yes |
paymentMethodTypeCode | The type of the payment method for which balance enquiry is for e.g VVC | Yes |
expDate | Expiry date of the payment instrument. Only required if expiry date was not saved. | No |
Secure | The secure validation value for the request at the time of the request. It is required if the request is not cardless | No |
Card Name | The name of the card currently set as default | Yes |
accountNo | The account number for which the balance enquiry is for. This is needed ofr a more specified inquiry. This is mostly needed when the Payment Method PAN is attached to more than the account number on Postcard. | No |
selAccType | The account type of the account to be inquired. | No |
pinData | The pin data required for the transaction if it is not a pinless transaction | No |
bankCode | The bank code of the issuer of the payment method | Yes |
Sample request
ENDPOINT: https://sandbox.interswitchng.com/api/v1/verve/wallet/subscribers/2348124888436/paymentmethods/ VEC/balances.json?scheme=webpay&channel=quicktellermobile&version=5.0&merchantid=QTMOBILE1ISUS
REQUEST BODY:
{
"paymentMethodCode":"ZIB",
"scheme":"EPG",
"cardName":"default",
"paymentMethodTypeCode":"VMP",
"subscriberId":"2347037941059",
"pinData":"d9e1a87c412a8dab",
"secure":"386a169596e6e0d1b528ab15dbc7d691cecd67f7656ec4badc9c3128961700939db6d847b22c2ba23f2bdee754b807701468513342980e8deefa60bd53d17fe5c95caac3d694cb6b846ca4a14dc1b86ed84a4b5bf67a9413b96720e3df87d5d5050db36fa64e021551db148f6696aaa5ae632f892004d748c23ac4d8c37faa364247d248cf48934cccde013c100ac2186e2d21c951cd66c755c473d9e0cba7ee6b2bfda1958144cceb5ea0cf3ec9badc48dbe3c1977a0f5729fbede8089372af9b106936887d4934a7bce457ca0424aad8f6b61e806bf9954524c7b73dcccabe9e8ac339289eaad76e045fce65e138815bbb9f17d273c0383320c330bca53178",
"ttid":"1000",
"version":"5.0"
}
GetBalance Response
A HTTP response code 200 is sent back for a success
Response Parameters
Field | Description | |
ledgerBalance | The Ledger Balance of the Payment Method on Post Card (in Major). | |
ledgerBalanceCurrency | The Currency of the
Ledger Balance | |
availableBalance | The Available Balance of the Payment Method on Post Card (in Major). | |
availableBalanceCurrency | The Currency of the Available Balance |
Sample Response
200
{
“ledgerBalance”: 2331297.87,
“ledgerBalanceCurrency”: “NGN”,
“availableBalanceCurrency”: “NGN”,
“availableBalance”: 2331297.87
}
Sample Response ( Failure)
{
“errors”: {
“message”: “Sorry, we could not process your transaction at this time. Poorly formatted secure data, secure data length longer than 64.”,
“code”: 5114
},
“error”: {
“message”: “Sorry, we could not process your transaction at this time. Poorly formatted secure data, secure data length longer than 64.”,
“code”: 5114
}
}
Communication
Requests will be sent over the REST protocol