Skip to content

Balance

To get the balance of your account, send a GET request to the following URL:

GET
js
https://api.payp.io/&/v2/balance

When sending the request, you will receive the total balance of cryptocurrencies across all your projects.

Headers

NameTypeDescription
AuthorizationstringToken API KEY

You can use the Token API KEY from any active project.

Response

json
{
    "status": "success",
    "result": [
        {
            "id": "BTC",
            "balance": 1.927302,
            "title": "Bitcoin"
        },
        {
            "id": "USDT-TRC20",
            "balance": 117,
            "title": "USDT (TRC-20)"
        },
        {
            "id": "ETC",
            "balance": 265.1238235,
            "title": "Eth Classic"
        }
        {...}
    ]
}
json
// Check the correctness of the API key
{
    "status": 401,
    "name": "UnauthorizedError",
    "message": "shop not found",
    "details": "check api key"
}

We do not freeze balances, and assets are immediately available for withdrawal.

Request Examples

The following examples show how to make a request to check your account balance. Please note that for correct authorization of the request, you must include your API key in the Authorization header.

curl
curl --location 'https://api.Payp.io/api/v2/balance' \
--header 'Authorization: Token <API KEY>'
php
<?php
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => 'https://api.payp.io/&/v2/balance',
      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(
        'Authorization: Token <API KEY>'
      ),
    ));
    
    $response = curl_exec($curl);
    
    curl_close($curl);
    echo $response;

?>
Python
import requests
import json

url = "https://api.payp.io/&/v2/invoice"
headers = {
    "Authorization": "Token <API KEY>",
    "Content-Type": "application/json"
}

data = {}
response = requests.get(url, headers=headers, json=data)

# Check response
if response.status_code == 200:
    print("Success:", response.json())
else:
    print("Fail:", response.status_code, response.text)
js
const myHeaders = new Headers();
myHeaders.append("Authorization", "Token <API KEY>");

const requestOptions = {
    method: "GET",
    headers: myHeaders,
    redirect: "follow"
};

fetch("https://api.payp.io/&/v2/balance", requestOptions)
    .then((response) => response.text())
    .then((result) => console.log(result))
    .catch((error) => console.error(error));

Payp