StoreGet balance
Get balance
GET /v1/balancehttps://api.securitypag.com
Authentication: Bearer · API key
Use the route v1/balance to retrieve the complete balance details of a store.
Important: Instead of using the default token to perform the request, you must use the API Withdrawal Credential , available on the Integrations , page, in the card "API Withdrawal Credentials" .
This route takes no request body.
Responses 200 Balance successfully returned. Displays available values, pending amounts, and today's transactions. 404 Store not found. 403 Unauthorized access. 400 Request error.
Something wrong on this page? Talk to us
Request cURL Node.js PHP Python
curl --request GET \
--url https://api.securitypag.com/v1/balance \
--header 'Authorization: Bearer SUA_CHAVE_DE_API' \
--header 'Content-Type: application/json' const response = await fetch("https://api.securitypag.com/v1/balance" , {
method: "GET" ,
headers: {
Authorization: "Bearer " + process.env.SUA_CHAVE_DE_API,
"Content-Type" : "application/json" ,
},
});
const data = await response.json();
console.log(data);<?php
$ch = curl_init ("https://api.securitypag.com/v1/balance" );
curl_setopt_array ($ch, [
CURLOPT_CUSTOMREQUEST => "GET" ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("SUA_CHAVE_DE_API" ),
"Content-Type: application/json" ,
],
]);
$data = json_decode (curl_exec ($ch), true );
print_r($data);import os
import requests
response = requests .request(
"GET" ,
"https://api.securitypag.com/v1/balance" ,
headers={
"Authorization" : "Bearer " + os.environ["SUA_CHAVE_DE_API" ],
"Content-Type" : "application/json" ,
},
)
print (response.json())
{
"available" : 5000 ,
"transfers" : {
"pending" : 180
},
"reserve" : {
"pending" : 320
},
"receivables" : {
"pending" : 0
},
"anticipations" : {
"pending" : 0
},
"todayPayments" : 2000 ,
"todayTransfers" : 1000
}{
"message" : "The user does not have permission for this operation."
}{
"message" : "Store not found."
}