P2P Transfer

Get Transfer Data

GET ‎https://<domain>/<api prefix>/<version>/user/p2p/transfer/

This API endpoint will return p2p transfer charges and user data.

Query Parameters

Headers

​HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
    "status_code": 200,
    "errors": {},
    "data": {
        "wallet_data": {
            "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": "<symbol>",
                "rate": <multiple_rate>
            }
        },
        "userdata": {
            "username": "<reciever_username>",
            "name": "<name>",
            "profile_image": "<profile_image_url>"
        }
    }
}

Sample Code

Node

var request = require('request');
var options = {
  'method': 'GET',
  'url': 'https://<domain>/<api prefix>/<version>/user/p2p/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/p2p/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

P2P Transfer

POST ‎https://<domain>/<api prefix>/<version>/user/p2p/transfer/

This API endpoint will perform a p2p transfer.

Headers

Request Body

​​​​​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/p2p/transfer/',
  'headers': {
    'apikey': '<apikey>',
    'Authorization': 'Bearer <access token>',
  },
  formData: {
    'wallet': '<wallet_key>',
    'transfer_amount': '<amount>',
    'reciever': '<reciever_username>',
    '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/p2p/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('wallet' => '<wallet_key>','transfer_amount' => '<amount>','reciever' => '<reciever_username>','form_key' => '<form_key>','token_checksum_field' => '<token_cheksum>','token_field' => '<token>'),
  CURLOPT_HTTPHEADER => array(
    'apikey: <apikey>',
    'Authorization: Bearer <access token>'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Error Responses

Last updated