---
title: Manual Wallet Transactions API
description: This API will be used for manual wallet transaction.
---

This API will be used for manual wallet transaction. We must pass txn mode: debit or credit, merchant id, token, private key, wallet user, order id, amount, channel, payee identifier, mer dom, output format and checksum in request. If the request has valid details, we will get a success response along with merchant id, username and wallet balance.

## POST

```
https://kraken.airpay.co.in/airpay/wallet/api/walletTxn.php
```

## Header

| Field | Type | Description |
| --- | --- | --- |
| Content-Type | String | application/x-www-form-urlencoded |

## Parameter

| Field | Type | Description |
| --- | --- | --- |
| txn_mode | Numeric | debit / credit (required) |
| merchant_id | Numeric | Merchant ID (required) |
| token | Numeric | Token generated during wallet creation (required) |
| private_key | Alphanumeric | Private Key (length 10-200) (required)<br>private_key = hash('sha256', secret.'@'.username.':|:'.password) |
| wallet_user | Alphanumeric | Email of wallet user (6-50) / Mobile number of the wallet user (numeric 10-15 digits) / UID (sent from merchant while wallet creation) (required) |
| order_id | Numeric | Merchant generated order id (required) |
| amount | Numeric | Amount to be redeem (required) |
| channel | Numeric | upi/mpesa (required) |
| payee_identifier | Numeric | Mobile number for mpesa or VPA of consumer in case of upi (required) |
| mer_dom | Numeric | base64_encode(urlencode()) (required) Valid domain URL registered with Airpay |
| outputFormat | Alphanumeric|Space | json/xml (default - xml) (required) |
| checksum | Alphanumeric | md5(merchant_id.token.wallet_user.txn_mode.order_id.amount.date('Y-m-d').private_key) (required) |
## Request-Example: 

```
curl --location 'https://kraken.airpay.co.in/airpay/wallet/api/walletTxn.php' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'merchant_id=18999' \
--data-urlencode 'private_key=53b7602609702bf0055437c5edec157b23f3ace90d34fcf07275872b2350e7d5' \
--data-urlencode 'buyer_email=aatest12@gmail.com' \
--data-urlencode 'buyer_phone=9234337892' \
--data-urlencode 'buyer_first_name=test' \
--data-urlencode 'buyer_last_name=test' \
--data-urlencode 'UID=1234' \
--data-urlencode 'checksum=72ce8cfbb1347905c34e121336bb3d09'
```

## Success 200

| Field | Type | Description |
| --- | --- | --- |
| TRANSACTIONSTATUS | Numeric | Transaction Payment Status<br>Success - 200 Transaction is success<br>Transaction in Process - 211 Transaction in processing<br>Failed - 400 Transaction in failed<br>Dropped - 401 The transaction will not register properly<br>Cancel - 402 payment that has not yet been processed<br>Incomplete - 403 Not recieved any call back from bank<br>Bounced - 405 The transaction has bounced<br>No Records - 503 There is no records found |
| MESSAGE | Alphanumeric | Response message received from payment gateway Success<br>Transaction is success<br>Transaction in Process<br>Transaction in processing<br>Failed<br>Transaction in failed<br>Dropped<br>The transaction will not register properly<br>Cancel<br>payment that has not yet been processed<br>Incomplete<br>Not recieved any call back from bank<br>Bounced<br>The transaction has bounced<br>No Records<br>There is no records found |
| CHMOD | Alphanumeric | Transaction Channle Mode - wallet |
| MERCHANTID | Alphanumeric | Merchant ID |
| USERNAME | Alphanumeric | User name of the wallet |
| WALLETBALANCE | Alphanumeric | Wallet Balance |
## Success-Response-JSON: 


```
HTTP/1.1 200 OK
{
  "TRANSACTION":
     {
          "TRANSACTIONSTATUS":200,
          "MESSAGE":"Successful",
          "CHMOD":"wallet",
          "MERCHANTID":"245",
          "USERNAME":"abc@gmail.com",
          "WALLETBALANCE":"50.00",
      }
  }
```
## Success-Response-XML: 
```
{
 <?xml version="1.0"?>
  <RESPONSE>
      <TRANSACTION>
          <TRANSACTIONSTATUS>200</TRANSACTIONSTATUS>
          <MESSAGE>Successful</MESSAGE>
          <CHMOD>wallet<CHMOD>
          <MERCHANTID>245</MERCHANTID>
         <USERNAME>abc@gmail.com</USERNAME>
          <WALLETBALANCE>50.00</WALLETBALANCE>
      </TRANSACTION>
  </RESPONSE>
}
```
## Failure-Response:JSON

```
{
    "TRANSACTION": {
        "TRANSACTIONSTATUS": "ERROR_CODE",
        "MESSAGE": "ERROR_MESSAGE"
    }
}
```
## Failure-Response:XML
```
{
  <?xml version="1.0"?>
      <RESPONSE>
          <TRANSACTION>
              <TRANSACTIONSTATUS>ERROR_CODE</TRANSACTIONSTATUS>
              <MESSAGE>ERROR_MESSAGE</MESSAGE>
          </TRANSACTION>
      </RESPONSE>
}
```