curl -X GET "https://pagamentos.basspago.com.br/api/v2/pix/payments/receipt/E87654321202607211440a1b2c3d4e5f" \
--cert ./client.crt \
--key ./client.key \
--pass "SUA_SENHA_DO_CERTIFICADO" \
-H "Authorization: Bearer {access_token}"
<?php
$e2eid = 'E87654321202607211440a1b2c3d4e5f';
$ch = curl_init("https://pagamentos.basspago.com.br/api/v2/pix/payments/receipt/{$e2eid}");
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 e2eid = "E87654321202607211440a1b2c3d4e5f";
const { data } = await axios.get(
`https://pagamentos.basspago.com.br/api/v2/pix/payments/receipt/${e2eid}`,
{
httpsAgent: agent,
headers: { Authorization: "Bearer {access_token}" },
}
);
console.log(data);
{
"data": {
"pdf": "JVBERi0xLjcKJfCflqQKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwovUGFnZXMgMyAwIFIKPj4KZW5kb2JqCg=="
}
}
Transferências
Comprovante PIX (PDF)
Obtenha o comprovante em PDF de uma transferência Pix.
GET
/
api
/
v2
/
pix
/
payments
/
receipt
/
{e2eid}
curl -X GET "https://pagamentos.basspago.com.br/api/v2/pix/payments/receipt/E87654321202607211440a1b2c3d4e5f" \
--cert ./client.crt \
--key ./client.key \
--pass "SUA_SENHA_DO_CERTIFICADO" \
-H "Authorization: Bearer {access_token}"
<?php
$e2eid = 'E87654321202607211440a1b2c3d4e5f';
$ch = curl_init("https://pagamentos.basspago.com.br/api/v2/pix/payments/receipt/{$e2eid}");
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 e2eid = "E87654321202607211440a1b2c3d4e5f";
const { data } = await axios.get(
`https://pagamentos.basspago.com.br/api/v2/pix/payments/receipt/${e2eid}`,
{
httpsAgent: agent,
headers: { Authorization: "Bearer {access_token}" },
}
);
console.log(data);
{
"data": {
"pdf": "JVBERi0xLjcKJfCflqQKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwovUGFnZXMgMyAwIFIKPj4KZW5kb2JqCg=="
}
}
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}.Path
string
required
E2E da transferência da qual você quer o comprovante.
Resposta
string
Documento do comprovante em uma string base64.
O campo
data.pdf contém o documento compactado em uma string base64. Para acessar o valor real, descompacte o base64.curl -X GET "https://pagamentos.basspago.com.br/api/v2/pix/payments/receipt/E87654321202607211440a1b2c3d4e5f" \
--cert ./client.crt \
--key ./client.key \
--pass "SUA_SENHA_DO_CERTIFICADO" \
-H "Authorization: Bearer {access_token}"
<?php
$e2eid = 'E87654321202607211440a1b2c3d4e5f';
$ch = curl_init("https://pagamentos.basspago.com.br/api/v2/pix/payments/receipt/{$e2eid}");
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 e2eid = "E87654321202607211440a1b2c3d4e5f";
const { data } = await axios.get(
`https://pagamentos.basspago.com.br/api/v2/pix/payments/receipt/${e2eid}`,
{
httpsAgent: agent,
headers: { Authorization: "Bearer {access_token}" },
}
);
console.log(data);
{
"data": {
"pdf": "JVBERi0xLjcKJfCflqQKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwovUGFnZXMgMyAwIFIKPj4KZW5kb2JqCg=="
}
}