P2P Transfer

Get Transfer Data

get
β€Ž
https://<domain>/<api prefix>/<version>/user/p2p/transfer/

Sample Code

Node
1
var request = require('request');
2
var options = {
3
'method': 'GET',
4
'url': 'https://<domain>/<api prefix>/<version>/user/p2p/transfer/',
5
'headers': {
6
'apikey': '<apikey>',
7
'Authorization': 'Bearer <access token>',
8
},
9
formData: {}
10
};
11
request(options, function (error, response) {
12
if (error) throw new Error(error);
13
console.log(response.body);
14
});
15
​
Copied!
PHP
1
<?php
2
​
3
$curl = curl_init();
4
​
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/user/p2p/transfer/',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'GET',
14
CURLOPT_HTTPHEADER => array(
15
'apikey: <apikey>',
16
'Authorization: Bearer <access token>',
17
),
18
));
19
​
20
$response = curl_exec($curl);
21
​
22
curl_close($curl);
23
echo $response;
Copied!

Error Responses

Status Code
Error Type
FIeld
Description
401
Request Failed
​
P2P transactions are disabled, Please contact your administrator.
400
Validation Error
wallet
P2P transactions are disabled for this wallet, Please contact your administrator or invalid wallet.
400
Validation Error
reciever
This field is required.
Reciever not found.
Self transfer not allowed.

P2P Transfer

post
β€Ž
https://<domain>/<api prefix>/<version>/user/p2p/transfer/

Sample Code

Node
1
var request = require('request');
2
var options = {
3
'method': 'POST',
4
'url': 'https://<domain>/<api prefix>/<version>/user/p2p/transfer/',
5
'headers': {
6
'apikey': '<apikey>',
7
'Authorization': 'Bearer <access token>',
8
},
9
formData: {
10
'wallet': '<wallet_key>',
11
'transfer_amount': '<amount>',
12
'reciever': '<reciever_username>',
13
'form_key': '<form_key>',
14
'token_checksum_field': '<token_checksum>',
15
'token_field': '<token>'
16
}
17
};
18
request(options, function (error, response) {
19
if (error) throw new Error(error);
20
console.log(response.body);
21
});
Copied!
PHP
1
<?php
2
​
3
$curl = curl_init();
4
​
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/user/p2p/transfer/',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'POST',
14
CURLOPT_POSTFIELDS => array('wallet' => '<wallet_key>','transfer_amount' => '<amount>','reciever' => '<reciever_username>','form_key' => '<form_key>','token_checksum_field' => '<token_cheksum>','token_field' => '<token>'),
15
CURLOPT_HTTPHEADER => array(
16
'apikey: <apikey>',
17
'Authorization: Bearer <access token>'
18
),
19
));
20
​
21
$response = curl_exec($curl);
22
​
23
curl_close($curl);
24
echo $response;
Copied!

Error Responses

Status Code
Error Type
FIeld
Description
400
Validation Error
wallet
This field is required.
This field may not be blank.
P2P transactions are disabled for this wallet, Please contact your administrator or invalid wallet.
400
Validation Error
transfer_amount
This field is required.
This field may not be blank.
Minimum transaction amount is <min_amount>.
Transaction Limit is <max_amount>.
Ensure this field has no more than 7 characters.
Only integers are allowed.
Entered amount is greater than wallet balance.
Invalid amount.
400
Validation Error
reciever
This field is required.
This field may not be blank.
Reciever user not found.
Self transfer not allowed.
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
​
P2P transactions are disabled, Please contact your administrator.
Last modified 2mo ago