curl -X GET "https://pagamentos.basspago.com.br/api/v2/accounts/balances?event_date_start=2026-07-01T00:00:00Z&event_date_end=2026-07-31T23:59:59Z" \
--cert ./client.crt \
--key ./client.key \
--pass "SUA_SENHA_DO_CERTIFICADO" \
-H "Authorization: Bearer {access_token}"
<?php
$query = http_build_query([
'event_date_start' => '2026-07-01T00:00:00Z',
'event_date_end' => '2026-07-31T23:59:59Z',
]);
$ch = curl_init("https://pagamentos.basspago.com.br/api/v2/accounts/balances?{$query}");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSLCERT => './client.crt',
CURLOPT_SSLKEY => './client.key',
CURLOPT_KEYPASSWD => 'SUA_SENHA_DO_CERTIFICADO',
CURLOPT_HTTPHEADER => ['Authorization: Bearer {access_token}'],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import fs from "node:fs";
import https from "node:https";
import axios from "axios";
const agent = new https.Agent({
cert: fs.readFileSync("./client.crt"),
key: fs.readFileSync("./client.key"),
passphrase: "SUA_SENHA_DO_CERTIFICADO",
});
const { data } = await axios.get(
"https://pagamentos.basspago.com.br/api/v2/accounts/balances",
{
httpsAgent: agent,
headers: { Authorization: "Bearer {access_token}" },
params: {
event_date_start: "2026-07-01T00:00:00Z",
event_date_end: "2026-07-31T23:59:59Z",
},
}
);
console.log(data);
{
"data": [
{
"eventDate": "2026-07-21",
"balanceAmount": {
"currency": "BRL",
"available": 84250.75,
"blocked": 3200.00,
"overdraft": 0.00
}
}
]
}
Transferências
Consultar saldo
Consulte o saldo da sua conta por período.
GET
/
api
/
v2
/
accounts
/
balances
curl -X GET "https://pagamentos.basspago.com.br/api/v2/accounts/balances?event_date_start=2026-07-01T00:00:00Z&event_date_end=2026-07-31T23:59:59Z" \
--cert ./client.crt \
--key ./client.key \
--pass "SUA_SENHA_DO_CERTIFICADO" \
-H "Authorization: Bearer {access_token}"
<?php
$query = http_build_query([
'event_date_start' => '2026-07-01T00:00:00Z',
'event_date_end' => '2026-07-31T23:59:59Z',
]);
$ch = curl_init("https://pagamentos.basspago.com.br/api/v2/accounts/balances?{$query}");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSLCERT => './client.crt',
CURLOPT_SSLKEY => './client.key',
CURLOPT_KEYPASSWD => 'SUA_SENHA_DO_CERTIFICADO',
CURLOPT_HTTPHEADER => ['Authorization: Bearer {access_token}'],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import fs from "node:fs";
import https from "node:https";
import axios from "axios";
const agent = new https.Agent({
cert: fs.readFileSync("./client.crt"),
key: fs.readFileSync("./client.key"),
passphrase: "SUA_SENHA_DO_CERTIFICADO",
});
const { data } = await axios.get(
"https://pagamentos.basspago.com.br/api/v2/accounts/balances",
{
httpsAgent: agent,
headers: { Authorization: "Bearer {access_token}" },
params: {
event_date_start: "2026-07-01T00:00:00Z",
event_date_end: "2026-07-31T23:59:59Z",
},
}
);
console.log(data);
{
"data": [
{
"eventDate": "2026-07-21",
"balanceAmount": {
"currency": "BRL",
"available": 84250.75,
"blocked": 3200.00,
"overdraft": 0.00
}
}
]
}
Essa rota utiliza os certificados e o Bearer Token de Cash Out.
Certificados
Esta rota usa autenticação mútua (mTLS). Envie o certificado de Cash Out, a chave e a senha na requisição:file
required
Certificado de Cash Out do cliente (
client.crt).file
required
Chave privada do cliente (
client.key).string
required
Senha para descriptografar a chave
.key, enviada por e-mail junto com os certificados.Headers
string
required
Bearer Token de Cash Out. Formato:
Bearer {access_token}.Query
string
required
Início do período consultado, no formato ISO 8601. Exemplo:
2026-07-01T00:00:00Z.string
required
Fim do período consultado, no formato ISO 8601. Exemplo:
2026-07-31T23:59:59Z.integer
Offset da página consultada (mínimo
1).integer
Registros por página, de
1 a 100. Padrão: 10.string
Campo usado para ordenar os resultados. Valor aceito:
EVENT_DATE.string
Direção da ordenação:
ASC (crescente) ou DESC (decrescente).string
Tipo de corte de borda do período:
BEGIN_OF_DAY ou END_OF_DAY.Resposta
array
curl -X GET "https://pagamentos.basspago.com.br/api/v2/accounts/balances?event_date_start=2026-07-01T00:00:00Z&event_date_end=2026-07-31T23:59:59Z" \
--cert ./client.crt \
--key ./client.key \
--pass "SUA_SENHA_DO_CERTIFICADO" \
-H "Authorization: Bearer {access_token}"
<?php
$query = http_build_query([
'event_date_start' => '2026-07-01T00:00:00Z',
'event_date_end' => '2026-07-31T23:59:59Z',
]);
$ch = curl_init("https://pagamentos.basspago.com.br/api/v2/accounts/balances?{$query}");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSLCERT => './client.crt',
CURLOPT_SSLKEY => './client.key',
CURLOPT_KEYPASSWD => 'SUA_SENHA_DO_CERTIFICADO',
CURLOPT_HTTPHEADER => ['Authorization: Bearer {access_token}'],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import fs from "node:fs";
import https from "node:https";
import axios from "axios";
const agent = new https.Agent({
cert: fs.readFileSync("./client.crt"),
key: fs.readFileSync("./client.key"),
passphrase: "SUA_SENHA_DO_CERTIFICADO",
});
const { data } = await axios.get(
"https://pagamentos.basspago.com.br/api/v2/accounts/balances",
{
httpsAgent: agent,
headers: { Authorization: "Bearer {access_token}" },
params: {
event_date_start: "2026-07-01T00:00:00Z",
event_date_end: "2026-07-31T23:59:59Z",
},
}
);
console.log(data);
{
"data": [
{
"eventDate": "2026-07-21",
"balanceAmount": {
"currency": "BRL",
"available": 84250.75,
"blocked": 3200.00,
"overdraft": 0.00
}
}
]
}