Comprovante
curl --request GET \
--url https://api.upag.io/v1/transfers/{transferId}/receipt \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.upag.io/v1/transfers/{transferId}/receipt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.upag.io/v1/transfers/{transferId}/receipt';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Transferências Pix
Comprovante
HTML do comprovante de uma transferência
GET
https://api.upag.io
/
v1
/
transfers
/
{transferId}
/
receipt
Comprovante
curl --request GET \
--url https://api.upag.io/v1/transfers/{transferId}/receipt \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.upag.io/v1/transfers/{transferId}/receipt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.upag.io/v1/transfers/{transferId}/receipt';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Retorna a página HTML do comprovante da transferência, em imagem (padrão) ou em PDF (a página já abre o diálogo de impressão do browser).
Permissão:
O corpo é a página HTML do comprovante, com valor, data, pagador, recebedor, chave Pix e o número de controle (EndToEndId, ou a referência do provedor).
transfer.read. Apenas chave secreta (sk_…).
Os exemplos usam o sandbox (
https://api.upag.dev/v1). Em produção use https://api.upag.io/v1 com sk_live_….Endpoint
curl "https://api.upag.dev/v1/transfers/770e8400-e29b-41d4-a716-446655440000/receipt?format=image" \
-H "Authorization: Bearer sk_test_your_api_key"
import { Upag } from 'upag';
const upag = new Upag('sk_test_your_api_key');
const html = await upag.transfers.receipt('770e8400-e29b-41d4-a716-446655440000', {
format: 'image',
});
Parâmetros
string (uuid)
required
ID da transferência.
string
default:"image"
image ou pdf. Os dois devolvem HTML; pdf inclui o gatilho de impressão automática.Resposta
200 OK
| Header | Valor |
|---|---|
Content-Type | text/html; charset=utf-8 |
Erros
| Status | Mensagem | Causa |
|---|---|---|
404 | Transfer not found | Transferência inexistente ou de outra conta |
404 | Account not found | A conta da chave não foi encontrada |
422 | VALIDATION_FAILED | transferId não é UUID, ou format inválido |