Wallet Balance API
This API retrieves the user’s wallet balance. It requires merchant ID, token, private key, wallet user, output format, and checksum. A successful request returns the transaction status, merchant ID, username, and wallet balance.
https://kraken.airpay.co.in/airpay/wallet/api/walletBalance.phpHeader
Section titled “Header”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| Content-Type required | String | The Content-Type header indicates the media type of the request or response body so the receiver knows how to process the data. | application/x-www-form-urlencodeds |
Request Body
Section titled “Request Body”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| merchant_id required | Number (1-20) | Merchant ID | 18999 |
| token required | String (10-200) | Token generated during wallet creation | 53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5 |
| private_key required | String (10-200) | Private Key, generated as hash(‘sha256’, secret.’@’.username.’: | :‘.password) |
| wallet_user required | String (6-50) | Email, mobile number, or UID of the wallet user | aatest12@gmail.com |
| outputFormat optional | String (1-3) | Response format: json or xml (default: xml) | xml |
| checksum required | String | MD5 hash: md5(merchant_id.token.wallet_user.date(‘Y-m-d’).private_key) | 72ce8cfbb1347905c34e121336bb3d09 |
Success 200
Section titled “Success 200”| Parameter | Type Value | Description | Value Like |
|---|---|---|---|
| TRANSACTIONSTATUS required | Number | Transaction status code: 200: Success (Transaction is successful)211: Transaction in Process (Transaction is processing)400: Failed (Transaction failed)401: Dropped (Transaction did not register properly)402: Cancel (Payment not yet processed)403: Incomplete (No callback received from bank)405: Bounced (Transaction bounced)503: No Records (No records found) | |
| MESSAGE required | String | Response message from the payment gateway (e.g., “Successful”, “Invalid checksum”) | |
| CHMOD required | String | Transaction channel mode (always “wallet”) | wallet |
| MERCHANTID required | String | Merchant ID | 18999 |
| USERNAME required | String | Email or username of the wallet user | |
| WALLETBALANCE required | Number | Wallet balance | 50.00 |
Request Example
Section titled “Request Example”curl --location 'https://kraken.airpay.co.in/airpay/wallet/api/walletBalance.php' \--header 'Content-Type: application/x-www-form-urlencoded' \--data-urlencode 'merchant_id=18999' \--data-urlencode 'token=53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5' \--data-urlencode 'private_key=53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5' \--data-urlencode 'wallet_user=aatest12@gmail.com' \--data-urlencode 'checksum=72ce8cfbb1347905c34e121336bb3d09'Success Response (JSON)
Section titled “Success Response (JSON)”HTTP/1.1 200 OK{ "TRANSACTION": { "CHMOD": "wallet", "TRANSACTIONSTATUS": 200, "MESSAGE": "Successful", "MERCHANTID": "18999", "USERNAME": "aatest12@gmail.com", "WALLETBALANCE": 50.00 }}Success Response (XML)
Section titled “Success Response (XML)”<?xml version="1.0" encoding="UTF-8"?><RESPONSE> <TRANSACTION> <TRANSACTIONSTATUS>200</TRANSACTIONSTATUS> <MESSAGE>Successful</MESSAGE> <CHMOD>wallet</CHMOD> <MERCHANTID>18999</MERCHANTID> <USERNAME>aatest12@gmail.com</USERNAME> <WALLETBALANCE>50.00</WALLETBALANCE> </TRANSACTION></RESPONSE>Error Response (JSON)
Section titled “Error Response (JSON)”HTTP/1.1 200 OK{ "TRANSACTION": { "TRANSACTIONSTATUS": "400", "MESSAGE": "Invalid checksum" }}Error Response (XML)
Section titled “Error Response (XML)”<?xml version="1.0" encoding="UTF-8"?><RESPONSE> <TRANSACTION> <TRANSACTIONSTATUS>400</TRANSACTIONSTATUS> <MESSAGE>Invalid checksum</MESSAGE> </TRANSACTION></RESPONSE>