Internal Transfer

Get Transfer Data

get
​

β€Žhttps://<domain>/<api prefix>/<version>/user/internal-wallet/transfer/
This API endpoint will return destination wallets with transfer charge data.
Request
Response
Request
Headers
apikey
required
string
Apikey
Authorization
required
string
Bearer access token
Query Parameters
wallet
optional
string
wallet key, defaule: wallet1
Response
200: OK
HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
"status_code": 200,
"errors": {},
"data": {
"destination_wallets": [
{
"destination_wallet": "<wallet_key>",
"destination_wallet_name": "<wallet_name>",
"wallet_balance": <wallet_balance>,
"transfer_charges": {
"transfer_charge": "<transfer_charge>",
"max_transfer_amount": "<max_transfer_amount>",
"min_transfer_amount": "<min_transfer_amount>",
"transfer_charge_type": "<transfer_charge_type>"
}
},
...
],
"currency_data": {
"decimals": <decimals>,
"symbol_placement": "<symbol_placement>",
"symbol": "<currency_symbol>",
"rate": <currency_rate>
}
}
}

Sample Code

Node

var request = require('request');
var options = {
'method': 'GET',
'url': 'https://<domain>/<api prefix>/<version>/user/internal-wallet/transfer/',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access token>',
},
formData: {}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
​

PHP

<?php
​
$curl = curl_init();
​
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/user/internal-wallet/transfer/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>',
),
));
​
$response = curl_exec($curl);
​
curl_close($curl);
echo $response;

Error Responses

Status Code

Error Type

FIeld

Description

400

Validation Error

source_wallet

Internal transactions are disabled for this wallet, Please contact your administrator.

No destination wallet found.

401

Request Failed

​

Internal transactions are disabled, Please contact your administrator.

Internal Transfer

post
​

β€Žhttps://<domain>/<api prefix>/<version>/user/internal-wallet/transfer/
This API endpoint will perform an internal wallet transfer.
Request
Response
Request
Headers
apikey
required
string
Apikey
Authorization
required
string
Bearer access token
Body Parameters
source_wallet
required
string
source wallet key
destination_wallet
required
string
destination wallet key
transfer_amount
required
string
transfer amount
form_key
required
string
form key
token_checksum_field
required
string
token checksum
token_field
required
string
token
Response
200: OK
HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
"status_code": 200,
"errors": {},
"data": {}
}

Sample Code

Node

var request = require('request');
var options = {
'method': 'POST',
'url': 'https://<domain>/<api prefix>/<version>/user/internal-wallet/transfer/',
'headers': {
'apikey': '<apikey>',
'Authorization': 'Bearer <access token>',
},
formData: {
'source_wallet': '<source_wallet>',
'destination_wallet': '<destination_wallet>',
'transfer_amount': '<transfer_amount>',
'form_key': '<form_key>',
'token_checksum_field': '<token_checksum>',
'token_field': '<token>'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});

PHP

<?php
​
$curl = curl_init();
​
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/user/internal-wallet/transfer/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('source_wallet' => '<source_wallet>','destination_wallet' => '<destination_wallet>','transfer_amount' => '<transfer_amount>','form_key' => '<form_key>','token_checksum_field' => '<token_checksum>','token_field' => '<token>'),
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>',
'Authorization: Bearer <access token>',
),
));
​
$response = curl_exec($curl);
​
curl_close($curl);
echo $response;

Error Responses

Status Code

Error Type

FIeld

Description

400

Validation Error

source_wallet

This field is required.

This field may not be blank.

Internal transactions are disabled for this wallet, Please contact your administrator or invalid source wallet.

400

Validation Error

destination_wallet

This field is required.

This field may not be blank.

Invalid destination wallet choosen.

400

Validation Error

transfer_amount

This field is required.

This field may not be blank.

Transaction Limit is <max_amount>.

Minimum transaction amount is <min_amount>.

Only integers are allowed.

Ensure this field has no more than 7 characters.

Entered amount is greater than wallet balance.

Invalid amount.

400

Validation Error

form_key

This field is required.

This field may not be blank.

You have another form running, Please reload.

400

Validation Error

token_checksum_field

This field is required.

This field may not be blank.

400

Validation Error

token_field

This field is required.

This field may not be blank.

Token is not matching.

Only numeric characters are allowed.

401

Request Failed

​

Some errors occured.

Internal transactions are disabled, Please contact your administrator.

No destination wallets found for this source wallet.

​