API do Serviço SPI
API Endpoint
https://api.dictra.com.brO Serviço SPI (Sistema de Pagamentos Instantâneos) gerencia o processamento de pagamentos instantâneos brasileiros via BACEN (Banco Central do Brasil). Esta API fornece endpoints para criar pagamentos PIX, consultar saldos, gerenciar pagamentos em lote, pagamentos recorrentes e operações de devolução.
Versão: 1.0.0 Protocolo: ISO 20022 (pacs.008, pacs.002, pacs.004, camt.060, pain.009, pain.011, pain.012) Meta de TPS: 1.500 transações por segundo Referência BACEN: Manual SPI v5.11.1
Autenticação
Todos os endpoints da API (exceto /health e /ready) requerem autenticação JWT.
Authorization: Bearer <jwt_token>
Fluxo de Mensagens ISO 20022
Criação de Pagamento
↓
pacs.008 (Transferência de Crédito) → BACEN
↓
pacs.002 (Relatório de Status) ← BACEN
↓
Pagamento Liquidado/Rejeitado
Tipos de Iniciação de Pagamento (LocalInstrument)
| Código | Nome | Chave PIX | TxId | Origem do EndToEndId | Correlação de Token |
|---|---|---|---|---|---|
| MANU | Entrada Manual | Não | Não | Gerado pelo SPI | Não |
| DICT | Consulta de Chave PIX | Obrigatória | Não | Gerado pelo DICT | Sim |
| QRES | QR Code Estático | Obrigatória | ≤25 chars | Gerado pelo SPI | Não |
| QRDN | QR Code Dinâmico | Obrigatória | 26-35 chars | Gerado pelo SPI | Não |
| INIC | Iniciador de Pagamento | Obrigatória | ≤25 chars | Gerado pelo SPI | Não |
| AUTO | PIX Automático | Opcional | 26-35 chars | Gerado pelo SPI | Não |
| APDN | PIX Automático Dinâmico | Opcional | 26-35 chars | Gerado pelo SPI | Não |
| APES | PIX Automático Estático | Opcional | ≤25 chars | Gerado pelo SPI | Não |
Importante: Apenas pagamentos iniciados via DICT disparam correlação de devolução de token com o dict-service.
Verificações de Saúde ¶
Endpoints de liveness e readiness probe.
Liveness ¶
Headers
Content-Type: application/jsonBody
{
"status": "healthy",
"uptime": "2h30m45s",
"timestamp": "2026-01-24T10:30:00Z"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"status": {
"type": "string"
},
"uptime": {
"type": "string"
},
"timestamp": {
"type": "string"
}
},
"required": [
"status",
"uptime",
"timestamp"
]
}Verificar LivenessGET/health
Retorna o status de liveness do serviço.
Readiness ¶
Headers
Content-Type: application/jsonBody
{
"status": "healthy",
"services": {
"database": "healthy",
"bacen": "healthy",
"nats": "healthy"
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"status": {
"type": "string"
},
"services": {
"type": "object",
"properties": {
"database": {
"type": "string"
},
"bacen": {
"type": "string"
},
"nats": {
"type": "string"
}
},
"required": [
"database",
"bacen",
"nats"
]
}
},
"required": [
"status",
"services"
]
}Headers
Content-Type: application/jsonBody
{
"status": "unhealthy",
"services": {
"database": "healthy",
"bacen": "unhealthy",
"nats": "healthy"
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"status": {
"type": "string"
},
"services": {
"type": "object",
"properties": {
"database": {
"type": "string"
},
"bacen": {
"type": "string"
},
"nats": {
"type": "string"
}
}
}
},
"required": [
"status",
"services"
]
}Verificar ReadinessGET/ready
Retorna o status de readiness do serviço com verificação de dependências.
Pagamentos Principais ¶
Operações de pagamento PIX usando mensagens ISO 20022 pacs.008.
Coleção de Pagamentos ¶
Headers
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Body
{
"local_instrument": "MANU",
"priority_type": "PAGPRI",
"priority_id": 1,
"purpose": "IPAY",
"amount": 10000,
"currency": "BRL",
"debtor": {
"ispb": "12345678",
"name": "João Silva",
"document": "12345678901",
"account_no": "00001234567",
"account_type": "CACC",
"branch": "0001"
},
"creditor": {
"ispb": "87654321",
"name": "Maria Oliveira",
"document": "98765432100",
"account_no": "00009876543",
"account_type": "CACC",
"branch": "0002",
"proxy": "maria@example.com"
},
"tx_id": "abc123",
"initiating_party": "12345678000199",
"description": "Pagamento por serviços",
"dict_end_to_end_id": "E1234567820260124103012345abcde",
"dict_correlation_id": "uuid-v4-correlation",
"origin_system": 1
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"local_instrument": {
"type": "string",
"enum": [
"MANU",
"DICT",
"QRES",
"QRDN",
"INIC",
"AUTO",
"APDN",
"APES"
],
"description": "Tipo de iniciação"
},
"priority_type": {
"type": "string",
"enum": [
"PAGPRI",
"PAGFRD",
"PAGAGD"
],
"description": "Prioridade do pagamento"
},
"priority_id": {
"type": "number",
"description": "ID de prioridade (1=ALTA, 2=NORMAL)"
},
"purpose": {
"type": "string",
"enum": [
"IPAY",
"GSCB",
"OTHR",
"REFU"
],
"description": "Propósito da transação"
},
"amount": {
"type": "number",
"description": "Valor em centavos (R$ 100,00)"
},
"currency": {
"type": "string"
},
"debtor": {
"type": "object",
"properties": {
"ispb": {
"type": "string",
"description": "ISPB de 8 dígitos"
},
"name": {
"type": "string"
},
"document": {
"type": "string",
"description": "CPF ou CNPJ"
},
"account_no": {
"type": "string"
},
"account_type": {
"type": "string",
"description": "CACC, SVGS, TRAN"
},
"branch": {
"type": "string"
}
},
"required": [
"ispb",
"document",
"account_no",
"account_type"
]
},
"creditor": {
"type": "object",
"properties": {
"ispb": {
"type": "string"
},
"name": {
"type": "string"
},
"document": {
"type": "string"
},
"account_no": {
"type": "string"
},
"account_type": {
"type": "string"
},
"branch": {
"type": "string"
},
"proxy": {
"type": "string",
"description": "Chave PIX (obrigatória para DICT, QRDN, QRES, INIC)"
}
},
"required": [
"ispb",
"document",
"account_no",
"account_type"
]
},
"tx_id": {
"type": "string",
"description": "ID da transação (obrigatório para QR/INIC)"
},
"initiating_party": {
"type": "string",
"description": "Obrigatório para INIC"
},
"description": {
"type": "string",
"description": "Máx 140 caracteres"
},
"dict_end_to_end_id": {
"type": "string",
"description": "Apenas para pagamentos DICT"
},
"dict_correlation_id": {
"type": "string",
"description": "Para rastreamento de devolução de token"
},
"origin_system": {
"type": "number"
}
},
"required": [
"local_instrument",
"priority_type",
"priority_id",
"purpose",
"amount",
"currency",
"debtor",
"creditor",
"origin_system"
]
}Headers
Content-Type: application/jsonBody
{
"id": 1,
"end_to_end_id": "E1234567820260124103012345abcde",
"message_id": "M1234567820260124103012345abcde",
"tx_id": "abc123",
"local_instrument": "DICT",
"priority_type": "PAGPRI",
"purpose": "IPAY",
"amount": 10000,
"currency": "BRL",
"debtor": {
"ispb": "12345678",
"name": "João Silva",
"document": "12345678901",
"account_no": "00001234567",
"account_type": "CACC"
},
"creditor": {
"ispb": "87654321",
"name": "Maria Oliveira",
"document": "98765432100",
"account_no": "00009876543",
"account_type": "CACC",
"proxy": "maria@example.com"
},
"status": "ENTRY_RECEIVED",
"operation_datetime": "2026-01-24T10:30:12Z",
"created_at": "2026-01-24T10:30:12Z",
"updated_at": "2026-01-24T10:30:12Z",
"dict_correlation_id": "uuid-v4-correlation",
"token_refunded": false
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"end_to_end_id": {
"type": "string",
"description": "32 caracteres"
},
"message_id": {
"type": "string",
"description": "32 caracteres"
},
"tx_id": {
"type": "string"
},
"local_instrument": {
"type": "string"
},
"priority_type": {
"type": "string"
},
"purpose": {
"type": "string"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string"
},
"debtor": {
"type": "object",
"properties": {
"ispb": {
"type": "string"
},
"name": {
"type": "string"
},
"document": {
"type": "string"
},
"account_no": {
"type": "string"
},
"account_type": {
"type": "string"
}
},
"required": [
"ispb",
"document",
"account_no",
"account_type"
]
},
"creditor": {
"type": "object",
"properties": {
"ispb": {
"type": "string"
},
"name": {
"type": "string"
},
"document": {
"type": "string"
},
"account_no": {
"type": "string"
},
"account_type": {
"type": "string"
},
"proxy": {
"type": "string"
}
},
"required": [
"ispb",
"document",
"account_no",
"account_type"
]
},
"status": {
"type": "string"
},
"operation_datetime": {
"type": "string"
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"dict_correlation_id": {
"type": "string"
},
"token_refunded": {
"type": "boolean"
}
},
"required": [
"id",
"end_to_end_id",
"message_id",
"local_instrument",
"priority_type",
"purpose",
"amount",
"currency",
"debtor",
"creditor",
"status",
"operation_datetime",
"created_at",
"updated_at",
"token_refunded"
]
}Headers
Content-Type: application/jsonBody
{
"error": "validation_failed",
"message": "Pagamentos DICT requerem chave PIX (CreditorProxy)"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}Criar PagamentoPOST/api/v1/payments
Cria um novo pagamento PIX. Regras de validação se aplicam baseadas no tipo LocalInstrument.
Pagamentos DICT: EndToEndId deve ser fornecido do dict-service (correlação de token). Outros Tipos: EndToEndId é gerado automaticamente pelo SPI.
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
{
"payments": [
{
"id": 1,
"end_to_end_id": "E1234567820260124103012345abcde",
"message_id": "M1234567820260124103012345abcde",
"local_instrument": "DICT",
"amount": 10000,
"currency": "BRL",
"status": "ACSP",
"operation_datetime": "2026-01-24T10:30:12Z",
"created_at": "2026-01-24T10:30:12Z"
}
],
"total": 123,
"limit": 50,
"offset": 0
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"payments": {
"type": "array"
},
"total": {
"type": "number"
},
"limit": {
"type": "number"
},
"offset": {
"type": "number"
}
},
"required": [
"payments",
"total",
"limit",
"offset"
]
}Listar PagamentosGET/api/v1/payments{?status,limit,offset}
Lista pagamentos com filtro de status opcional.
- status
string(optional) Example: ACSPFiltrar por status
Choices:
ENTRY_RECEIVEDVALIDATEDPENDING_BACENSENT_TO_BACENACSPACCCRJCTPDNGCANC- limit
number(optional) Example: 50Máximo de resultados (padrão: 50)
- offset
number(optional) Example: 0Offset de paginação
Pagamento ¶
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
{
"id": 1,
"end_to_end_id": "E1234567820260124103012345abcde",
"message_id": "M1234567820260124103012345abcde",
"tx_id": "abc123",
"local_instrument": "DICT",
"priority_type": "PAGPRI",
"priority_id": 1,
"purpose": "IPAY",
"amount": 10000,
"currency": "BRL",
"debtor": {
"ispb": "12345678",
"name": "João Silva",
"document": "12345678901",
"account_no": "00001234567",
"account_type": "CACC",
"branch": "0001"
},
"creditor": {
"ispb": "87654321",
"name": "Maria Oliveira",
"document": "98765432100",
"account_no": "00009876543",
"account_type": "CACC",
"branch": "0002",
"proxy": "maria@example.com"
},
"status": "ACSP",
"reason_code": "ACSP",
"operation_datetime": "2026-01-24T10:30:12Z",
"acceptance_datetime": "2026-01-24T10:30:15Z",
"created_at": "2026-01-24T10:30:12Z",
"updated_at": "2026-01-24T10:30:15Z",
"dict_correlation_id": "uuid-v4-correlation",
"token_refunded": true
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"end_to_end_id": {
"type": "string"
},
"message_id": {
"type": "string"
},
"tx_id": {
"type": "string"
},
"local_instrument": {
"type": "string"
},
"priority_type": {
"type": "string"
},
"priority_id": {
"type": "number"
},
"purpose": {
"type": "string"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string"
},
"debtor": {
"type": "object",
"properties": {
"ispb": {
"type": "string"
},
"name": {
"type": "string"
},
"document": {
"type": "string"
},
"account_no": {
"type": "string"
},
"account_type": {
"type": "string"
},
"branch": {
"type": "string"
}
},
"required": [
"ispb",
"document",
"account_no",
"account_type"
]
},
"creditor": {
"type": "object",
"properties": {
"ispb": {
"type": "string"
},
"name": {
"type": "string"
},
"document": {
"type": "string"
},
"account_no": {
"type": "string"
},
"account_type": {
"type": "string"
},
"branch": {
"type": "string"
},
"proxy": {
"type": "string"
}
},
"required": [
"ispb",
"document",
"account_no",
"account_type"
]
},
"status": {
"type": "string"
},
"reason_code": {
"type": "string"
},
"operation_datetime": {
"type": "string"
},
"acceptance_datetime": {
"type": "string"
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"dict_correlation_id": {
"type": "string"
},
"token_refunded": {
"type": "boolean"
}
},
"required": [
"id",
"end_to_end_id",
"message_id",
"local_instrument",
"priority_type",
"priority_id",
"purpose",
"amount",
"currency",
"debtor",
"creditor",
"status",
"operation_datetime",
"created_at",
"updated_at",
"token_refunded"
]
}Headers
Content-Type: application/jsonBody
{
"error": "not_found",
"message": "Pagamento não encontrado"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}Obter PagamentoGET/api/v1/payments/{id}
Recupera detalhes do pagamento por ID ou EndToEndId.
- id
string(required) Example: 1ID do Pagamento ou EndToEndId
Histórico do Pagamento ¶
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
Operações de consulta de saldo BACEN usando mensagens ISO 20022 camt.060.Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"payment_id": {
"type": "number"
},
"end_to_end_id": {
"type": "string"
},
"history": {
"type": "array"
}
},
"required": [
"payment_id",
"end_to_end_id",
"history"
]
}Obter Histórico do PagamentoGET/api/v1/payments/{id}/history
Recupera o histórico de status do pagamento.
- id
string(required) Example: 1ID do Pagamento ou EndToEndId
Saldo Atual ¶
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
{
"ispb": "12345678",
"available": "1000000.00",
"blocked": "50000.00",
"projected": "950000.00",
"pending_debits": "30000.00",
"pending_credits": "20000.00",
"as_of": "2026-01-24T10:30:00Z",
"source": "bacen"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"ispb": {
"type": "string"
},
"available": {
"type": "string",
"description": "String decimal"
},
"blocked": {
"type": "string"
},
"projected": {
"type": "string"
},
"pending_debits": {
"type": "string"
},
"pending_credits": {
"type": "string"
},
"as_of": {
"type": "string"
},
"source": {
"type": "string",
"description": "cache, bacen, calculated"
}
},
"required": [
"ispb",
"available",
"blocked",
"projected",
"pending_debits",
"pending_credits",
"as_of",
"source"
]
}Obter Saldo AtualGET/api/v1/balance{?ispb}
Recupera o saldo disponível atual de um participante.
- ispb
string(required) Example: 12345678ISPB do participante de 8 dígitos
Saldo Projetado ¶
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
{
"current_available": "1000000.00",
"pending_debits": "30000.00",
"pending_credits": "20000.00",
"projected_amount": "990000.00",
"pending_count": 45,
"as_of": "2026-01-24T10:30:00Z"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"current_available": {
"type": "string"
},
"pending_debits": {
"type": "string"
},
"pending_credits": {
"type": "string"
},
"projected_amount": {
"type": "string"
},
"pending_count": {
"type": "number"
},
"as_of": {
"type": "string"
}
},
"required": [
"current_available",
"pending_debits",
"pending_credits",
"projected_amount",
"pending_count",
"as_of"
]
}Obter Saldo ProjetadoGET/api/v1/balance/projected{?ispb}
Recupera o saldo projetado com transações pendentes.
- ispb
string(required) Example: 12345678
Saldo do Dia Anterior ¶
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
{
"ispb": "12345678",
"date": "2026-01-23",
"opening_balance": "950000.00",
"closing_balance": "1000000.00",
"total_credits": "200000.00",
"total_debits": "150000.00",
"transaction_count": 342
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"ispb": {
"type": "string"
},
"date": {
"type": "string"
},
"opening_balance": {
"type": "string"
},
"closing_balance": {
"type": "string"
},
"total_credits": {
"type": "string"
},
"total_debits": {
"type": "string"
},
"transaction_count": {
"type": "number"
}
},
"required": [
"ispb",
"date",
"opening_balance",
"closing_balance",
"total_credits",
"total_debits",
"transaction_count"
]
}Obter Saldo do Dia AnteriorGET/api/v1/balance/previous-day{?ispb}
Recupera o saldo de fechamento do dia anterior.
- ispb
string(required) Example: 12345678
Histórico de Saldo ¶
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
{
"ispb": "12345678",
"from_date": "2026-01-01",
"to_date": "2026-01-24",
"entries": [
{
"date": "2026-01-23",
"opening_balance": "950000.00",
"closing_balance": "1000000.00",
"total_credits": "200000.00",
"total_debits": "150000.00",
"transaction_count": 342
},
{
"date": "2026-01-24",
"opening_balance": "1000000.00",
"closing_balance": "1050000.00",
"total_credits": "250000.00",
"total_debits": "200000.00",
"transaction_count": 387
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"ispb": {
"type": "string"
},
"from_date": {
"type": "string"
},
"to_date": {
"type": "string"
},
"entries": {
"type": "array"
}
},
"required": [
"ispb",
"from_date",
"to_date",
"entries"
]
}Obter Histórico de SaldoGET/api/v1/balance/history{?ispb,from_date,to_date}
Recupera dados históricos de saldo.
- ispb
string(required) Example: 12345678- from_date
string(required) Example: 2026-01-01Data ISO 8601
- to_date
string(required) Example: 2026-01-24
Consulta de Saldo ¶
Headers
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Body
{
"ispb": "12345678",
"query_type": "CURRENT",
"requested_msg": "camt.052",
"balance_type": "CLBD",
"reporting_from": "2026-01-24T00:00:00Z",
"reporting_to": "2026-01-24T23:59:59Z"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"ispb": {
"type": "string"
},
"query_type": {
"type": "string",
"enum": [
"CURRENT",
"PROJECTED",
"PREVIOUS_DAY",
"HISTORY",
"INTRADAY"
]
},
"requested_msg": {
"type": "string",
"enum": [
"camt.052",
"camt.053",
"camt.054"
]
},
"balance_type": {
"type": "string",
"enum": [
"CLBD",
"XPCD",
"OPBD",
"ITAV"
]
},
"reporting_from": {
"type": "string"
},
"reporting_to": {
"type": "string"
}
},
"required": [
"ispb",
"query_type",
"requested_msg",
"balance_type",
"reporting_from"
]
}Headers
Content-Type: application/jsonBody
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"message_id": "M1234567820260124103012345abcde",
"ispb": "12345678",
"query_type": "CURRENT",
"status": "PENDING",
"created_at": "2026-01-24T10:30:12Z"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"message_id": {
"type": "string"
},
"ispb": {
"type": "string"
},
"query_type": {
"type": "string"
},
"status": {
"type": "string"
},
"created_at": {
"type": "string"
}
},
"required": [
"id",
"message_id",
"ispb",
"query_type",
"status",
"created_at"
]
}Criar Consulta de SaldoPOST/api/v1/balance/query
Cria uma nova solicitação de consulta de saldo camt.060 para o BACEN.
Lista de Consultas de Saldo ¶
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
{
"queries": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"message_id": "M1234567820260124103012345abcde",
"ispb": "12345678",
"query_type": "CURRENT",
"status": "COMPLETED",
"created_at": "2026-01-24T10:30:12Z",
"updated_at": "2026-01-24T10:30:15Z"
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"queries": {
"type": "array"
}
},
"required": [
"queries"
]
}Listar Consultas de SaldoGET/api/v1/balance/queries{?ispb,status}
Lista solicitações de consulta de saldo.
- ispb
string(optional) Example: 12345678- status
string(optional) Example: COMPLETEDChoices:
PENDINGPROCESSINGCOMPLETEDFAILED
Detalhes da Consulta de Saldo ¶
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
Operações de pagamento em lote usando mensagens ISO 20022 pain.001.
**Limites:**Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"message_id": {
"type": "string"
},
"ispb": {
"type": "string"
},
"query_type": {
"type": "string"
},
"status": {
"type": "string"
},
"response_data": {
"type": "object",
"properties": {
"message_id": {
"type": "string"
},
"created_at": {
"type": "string"
},
"account_ispb": {
"type": "string"
},
"balances": {
"type": "array"
},
"total_entries": {
"type": "number"
},
"total_credit_sum": {
"type": "string"
},
"total_debit_sum": {
"type": "string"
}
},
"required": [
"message_id",
"created_at",
"account_ispb",
"balances",
"total_entries",
"total_credit_sum",
"total_debit_sum"
]
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"required": [
"id",
"message_id",
"ispb",
"query_type",
"status",
"created_at",
"updated_at"
]
}Obter Consulta de SaldoGET/api/v1/balance/queries/{id}
Recupera detalhes da consulta de saldo e resposta.
- id
string(required) Example: 550e8400-e29b-41d4-a716-446655440000ID da Consulta
Lotes ¶
Headers
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Body
{
"batch_id": "BATCH001",
"participant_ispb": "12345678",
"requested_execution_date": "2026-01-24",
"payments": [
{
"local_instrument": "MANU",
"amount": 10000,
"currency": "BRL",
"debtor": {
"ispb": "12345678",
"account_no": "00001234567",
"account_type": "CACC",
"document": "12345678901"
},
"creditor": {
"ispb": "87654321",
"account_no": "00009876543",
"account_type": "CACC",
"document": "98765432100"
}
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"batch_id": {
"type": "string"
},
"participant_ispb": {
"type": "string"
},
"requested_execution_date": {
"type": "string"
},
"payments": {
"type": "array",
"description": "Máx 10 itens"
}
},
"required": [
"batch_id",
"participant_ispb",
"requested_execution_date",
"payments"
]
}Headers
Content-Type: application/jsonBody
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"batch_id": "BATCH001",
"message_id": "M1234567820260124103012345abcde",
"participant_ispb": "12345678",
"status": "PENDING",
"total_amount": 100000,
"item_count": 10,
"created_at": "2026-01-24T10:30:12Z"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"batch_id": {
"type": "string"
},
"message_id": {
"type": "string"
},
"participant_ispb": {
"type": "string"
},
"status": {
"type": "string"
},
"total_amount": {
"type": "number"
},
"item_count": {
"type": "number"
},
"created_at": {
"type": "string"
}
},
"required": [
"id",
"batch_id",
"message_id",
"participant_ispb",
"status",
"total_amount",
"item_count",
"created_at"
]
}Criar LotePOST/api/v1/batches
Cria um novo pagamento em lote.
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
{
"batches": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"batch_id": "BATCH001",
"message_id": "M1234567820260124103012345abcde",
"status": "COMPLETED",
"total_amount": 100000,
"item_count": 10,
"created_at": "2026-01-24T10:30:12Z"
}
],
"total": 45
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"batches": {
"type": "array"
},
"total": {
"type": "number"
}
},
"required": [
"batches",
"total"
]
}Listar LotesGET/api/v1/batches{?status,limit,offset}
Lista pagamentos em lote.
- status
string(optional) Example: COMPLETEDChoices:
PENDINGPROCESSINGCOMPLETEDFAILED- limit
number(optional) Example: 50- offset
number(optional) Example: 0
Detalhes do Lote ¶
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"batch_id": "BATCH001",
"message_id": "M1234567820260124103012345abcde",
"participant_ispb": "12345678",
"status": "COMPLETED",
"total_amount": 100000,
"item_count": 10,
"requested_execution_date": "2026-01-24",
"created_at": "2026-01-24T10:30:12Z",
"updated_at": "2026-01-24T10:30:20Z",
"processed_at": "2026-01-24T10:30:20Z"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"batch_id": {
"type": "string"
},
"message_id": {
"type": "string"
},
"participant_ispb": {
"type": "string"
},
"status": {
"type": "string"
},
"total_amount": {
"type": "number"
},
"item_count": {
"type": "number"
},
"requested_execution_date": {
"type": "string"
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"processed_at": {
"type": "string"
}
},
"required": [
"id",
"batch_id",
"message_id",
"participant_ispb",
"status",
"total_amount",
"item_count",
"requested_execution_date",
"created_at",
"updated_at"
]
}Obter LoteGET/api/v1/batches/{id}
Recupera detalhes do lote.
- id
string(required) Example: 550e8400-e29b-41d4-a716-446655440000ID do Lote
Itens do Lote ¶
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
Operações de pagamento recorrente (PIX Automático) usando mensagens ISO 20022 pain.Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"batch_id": {
"type": "string"
},
"items": {
"type": "array"
}
},
"required": [
"batch_id",
"items"
]
}Obter Itens do LoteGET/api/v1/batches/{id}/items
Recupera itens dentro de um lote.
- id
string(required) Example: 550e8400-e29b-41d4-a716-446655440000ID do Lote
Recorrências ¶
Headers
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Body
{
"mandate_id": "MANDATE123456789012345678901234",
"participant_ispb": "12345678",
"debtor": {
"ispb": "12345678",
"account": "00001234567",
"account_type": "CACC",
"name": "João Silva",
"document": "12345678901"
},
"creditor": {
"ispb": "87654321",
"account": "00009876543",
"account_type": "CACC",
"name": "Maria Oliveira",
"document": "98765432100",
"pix_key": "maria@example.com"
},
"amount": "100.00",
"currency": "BRL",
"frequency": "DAILY",
"start_date": "2026-01-24T00:00:00Z",
"end_date": "2027-01-24T00:00:00Z",
"max_executions": 12,
"description": "Assinatura mensal"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"mandate_id": {
"type": "string",
"description": "26-35 caracteres"
},
"participant_ispb": {
"type": "string"
},
"debtor": {
"type": "object",
"properties": {
"ispb": {
"type": "string"
},
"account": {
"type": "string"
},
"account_type": {
"type": "string"
},
"name": {
"type": "string"
},
"document": {
"type": "string"
}
},
"required": [
"ispb",
"account",
"account_type",
"name",
"document"
]
},
"creditor": {
"type": "object",
"properties": {
"ispb": {
"type": "string"
},
"account": {
"type": "string"
},
"account_type": {
"type": "string"
},
"name": {
"type": "string"
},
"document": {
"type": "string"
},
"pix_key": {
"type": "string"
}
},
"required": [
"ispb",
"account",
"account_type",
"name",
"document"
]
},
"amount": {
"type": "string",
"description": "String decimal"
},
"currency": {
"type": "string"
},
"frequency": {
"type": "string",
"enum": [
"DAILY",
"WEEKLY",
"MONTHLY",
"YEARLY"
]
},
"start_date": {
"type": "string"
},
"end_date": {
"type": "string"
},
"max_executions": {
"type": "number"
},
"description": {
"type": "string"
}
},
"required": [
"mandate_id",
"participant_ispb",
"debtor",
"creditor",
"amount",
"currency",
"frequency",
"start_date"
]
}Headers
Content-Type: application/jsonBody
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"mandate_id": "MANDATE123456789012345678901234",
"participant_ispb": "12345678",
"amount": "100.00",
"frequency": "MONTHLY",
"start_date": "2026-01-24T00:00:00Z",
"end_date": "2027-01-24T00:00:00Z",
"next_execution": "2026-01-24T00:00:00Z",
"execution_count": 0,
"max_executions": 12,
"status": "PENDING_APPROVAL",
"created_at": "2026-01-24T10:30:12Z"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"mandate_id": {
"type": "string"
},
"participant_ispb": {
"type": "string"
},
"amount": {
"type": "string"
},
"frequency": {
"type": "string"
},
"start_date": {
"type": "string"
},
"end_date": {
"type": "string"
},
"next_execution": {
"type": "string"
},
"execution_count": {
"type": "number"
},
"max_executions": {
"type": "number"
},
"status": {
"type": "string"
},
"created_at": {
"type": "string"
}
},
"required": [
"id",
"mandate_id",
"participant_ispb",
"amount",
"frequency",
"start_date",
"next_execution",
"execution_count",
"status",
"created_at"
]
}Criar RecorrênciaPOST/api/v1/recurrence
Cria um novo pagamento recorrente (pain.009).
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
{
"recurrences": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"mandate_id": "MANDATE123456789012345678901234",
"amount": "100.00",
"frequency": "MONTHLY",
"next_execution": "2026-02-24T00:00:00Z",
"execution_count": 1,
"status": "ACTIVE"
}
],
"total": 23
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"recurrences": {
"type": "array"
},
"total": {
"type": "number"
}
},
"required": [
"recurrences",
"total"
]
}Listar RecorrênciasGET/api/v1/recurrence{?status,limit,offset}
Lista pagamentos recorrentes.
- status
string(optional) Example: ACTIVEChoices:
PENDING_APPROVALACTIVEPAUSEDCOMPLETEDCANCELLED- limit
number(optional) Example: 50- offset
number(optional) Example: 0
Detalhes da Recorrência ¶
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"mandate_id": "MANDATE123456789012345678901234",
"participant_ispb": "12345678",
"debtor": {
"ispb": "12345678",
"account": "00001234567",
"account_type": "CACC",
"name": "João Silva",
"document": "12345678901"
},
"creditor": {
"ispb": "87654321",
"account": "00009876543",
"account_type": "CACC",
"name": "Maria Oliveira",
"document": "98765432100"
},
"amount": "100.00",
"frequency": "MONTHLY",
"start_date": "2026-01-24T00:00:00Z",
"end_date": "2027-01-24T00:00:00Z",
"next_execution": "2026-02-24T00:00:00Z",
"execution_count": 1,
"max_executions": 12,
"status": "ACTIVE",
"created_at": "2026-01-24T10:30:12Z",
"updated_at": "2026-01-24T11:30:12Z"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"mandate_id": {
"type": "string"
},
"participant_ispb": {
"type": "string"
},
"debtor": {
"type": "object",
"properties": {
"ispb": {
"type": "string"
},
"account": {
"type": "string"
},
"account_type": {
"type": "string"
},
"name": {
"type": "string"
},
"document": {
"type": "string"
}
},
"required": [
"ispb",
"account",
"account_type",
"name",
"document"
]
},
"creditor": {
"type": "object",
"properties": {
"ispb": {
"type": "string"
},
"account": {
"type": "string"
},
"account_type": {
"type": "string"
},
"name": {
"type": "string"
},
"document": {
"type": "string"
}
},
"required": [
"ispb",
"account",
"account_type",
"name",
"document"
]
},
"amount": {
"type": "string"
},
"frequency": {
"type": "string"
},
"start_date": {
"type": "string"
},
"end_date": {
"type": "string"
},
"next_execution": {
"type": "string"
},
"execution_count": {
"type": "number"
},
"max_executions": {
"type": "number"
},
"status": {
"type": "string"
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"required": [
"id",
"mandate_id",
"participant_ispb",
"debtor",
"creditor",
"amount",
"frequency",
"start_date",
"next_execution",
"execution_count",
"status",
"created_at",
"updated_at"
]
}Obter RecorrênciaGET/api/v1/recurrence/{id}
Recupera detalhes da recorrência.
- id
string(required) Example: 550e8400-e29b-41d4-a716-446655440000ID da Recorrência
Headers
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Body
{
"amount": "150.00",
"frequency": "WEEKLY",
"end_date": "2027-06-24T00:00:00Z"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "string"
},
"frequency": {
"type": "string"
},
"end_date": {
"type": "string"
}
}
}Headers
Content-Type: application/jsonBody
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"mandate_id": "MANDATE123456789012345678901234",
"amount": "150.00",
"frequency": "WEEKLY",
"status": "ACTIVE",
"updated_at": "2026-01-24T11:30:12Z"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"mandate_id": {
"type": "string"
},
"amount": {
"type": "string"
},
"frequency": {
"type": "string"
},
"status": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"required": [
"id",
"mandate_id",
"amount",
"frequency",
"status",
"updated_at"
]
}Atualizar RecorrênciaPUT/api/v1/recurrence/{id}
Atualiza recorrência (pain.012 - MandateAmendment).
- id
string(required) Example: 550e8400-e29b-41d4-a716-446655440000ID da Recorrência
Pausar Recorrência ¶
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "PAUSED",
"paused_at": "2026-01-24T11:30:12Z"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "string"
},
"paused_at": {
"type": "string"
}
},
"required": [
"id",
"status",
"paused_at"
]
}Pausar RecorrênciaPOST/api/v1/recurrence/{id}/pause
Pausa uma recorrência ativa.
- id
string(required) Example: 550e8400-e29b-41d4-a716-446655440000ID da Recorrência
Retomar Recorrência ¶
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "ACTIVE",
"resumed_at": "2026-01-24T12:00:00Z"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "string"
},
"resumed_at": {
"type": "string"
}
},
"required": [
"id",
"status",
"resumed_at"
]
}Retomar RecorrênciaPOST/api/v1/recurrence/{id}/resume
Retoma uma recorrência pausada.
- id
string(required) Example: 550e8400-e29b-41d4-a716-446655440000ID da Recorrência
Cancelar Recorrência ¶
Headers
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Body
{
"reason_code": "CUST",
"reason_description": "Solicitação do cliente"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"reason_code": {
"type": "string"
},
"reason_description": {
"type": "string"
}
},
"required": [
"reason_code"
]
}Headers
Content-Type: application/jsonBody
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "CANCELLED",
"reason_code": "CUST",
"cancelled_at": "2026-01-24T12:00:00Z"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "string"
},
"reason_code": {
"type": "string"
},
"cancelled_at": {
"type": "string"
}
},
"required": [
"id",
"status",
"reason_code",
"cancelled_at"
]
}Cancelar RecorrênciaPOST/api/v1/recurrence/{id}/cancel
Cancela uma recorrência (pain.011 - MandateCancellation).
- id
string(required) Example: 550e8400-e29b-41d4-a716-446655440000ID da Recorrência
Execuções da Recorrência ¶
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
Operações de devolução de pagamento usando mensagens ISO 20022 pacs.004.Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"recurrence_id": {
"type": "string"
},
"executions": {
"type": "array"
}
},
"required": [
"recurrence_id",
"executions"
]
}Obter Histórico de ExecuçãoGET/api/v1/recurrence/{id}/executions
Recupera histórico de execução de uma recorrência.
- id
string(required) Example: 550e8400-e29b-41d4-a716-446655440000ID da Recorrência
Devoluções ¶
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
{
"returns": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"return_id": "D1234567820260124103012345abcde",
"original_end_to_end_id": "E8765432120260123103012345abcde",
"amount": "100.00",
"reason_code": "FR01",
"status": "SETTLED",
"requested_at": "2026-01-24T10:30:12Z"
}
],
"total": 34
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"returns": {
"type": "array"
},
"total": {
"type": "number"
}
},
"required": [
"returns",
"total"
]
}Listar DevoluçõesGET/api/v1/returns{?status,limit,offset}
Lista solicitações de devolução.
- status
string(optional) Example: SETTLEDChoices:
REQUESTEDSENTACCEPTEDSETTLEDREJECTEDFAILEDCANCELLED- limit
number(optional) Example: 50- offset
number(optional) Example: 0
Detalhes da Devolução ¶
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"return_id": "D1234567820260124103012345abcde",
"message_id": "M1234567820260124103012345abcde",
"original_payment_id": 123,
"original_end_to_end_id": "E8765432120260123103012345abcde",
"original_message_id": "M8765432120260123103012345abcde",
"original_amount": 10000,
"amount": "100.00",
"currency": "BRL",
"reason_code": "FR01",
"reason_text": "Fraude detectada",
"requestor": {
"ispb": "12345678",
"account": "00001234567",
"name": "João Silva",
"document": "12345678901"
},
"counterparty": {
"ispb": "87654321",
"account": "00009876543",
"name": "Maria Oliveira",
"document": "98765432100"
},
"status": "SETTLED",
"requested_at": "2026-01-24T10:30:12Z",
"settled_at": "2026-01-24T10:30:20Z",
"created_at": "2026-01-24T10:30:12Z",
"updated_at": "2026-01-24T10:30:20Z"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"return_id": {
"type": "string"
},
"message_id": {
"type": "string"
},
"original_payment_id": {
"type": "number"
},
"original_end_to_end_id": {
"type": "string"
},
"original_message_id": {
"type": "string"
},
"original_amount": {
"type": "number"
},
"amount": {
"type": "string"
},
"currency": {
"type": "string"
},
"reason_code": {
"type": "string"
},
"reason_text": {
"type": "string"
},
"requestor": {
"type": "object",
"properties": {
"ispb": {
"type": "string"
},
"account": {
"type": "string"
},
"name": {
"type": "string"
},
"document": {
"type": "string"
}
},
"required": [
"ispb",
"account",
"name",
"document"
]
},
"counterparty": {
"type": "object",
"properties": {
"ispb": {
"type": "string"
},
"account": {
"type": "string"
},
"name": {
"type": "string"
},
"document": {
"type": "string"
}
},
"required": [
"ispb",
"account",
"name",
"document"
]
},
"status": {
"type": "string"
},
"requested_at": {
"type": "string"
},
"settled_at": {
"type": "string"
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
}
},
"required": [
"id",
"return_id",
"message_id",
"original_payment_id",
"original_end_to_end_id",
"original_message_id",
"original_amount",
"amount",
"currency",
"reason_code",
"requestor",
"counterparty",
"status",
"requested_at",
"created_at",
"updated_at"
]
}Obter DevoluçãoGET/api/v1/returns/{id}
Recupera detalhes da devolução.
- id
string(required) Example: 550e8400-e29b-41d4-a716-446655440000ID da Devolução
Devolução de Pagamento ¶
Headers
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Body
{
"amount": "100.00",
"reason_code": "AC03",
"reason_text": "Fraude detectada pelo MED 2.0"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "string",
"description": "Devolução total ou parcial"
},
"reason_code": {
"type": "string",
"enum": [
"AC03",
"AC04",
"AC06",
"AM04",
"AM09",
"FR01",
"MD06",
"SL02",
"RR04"
],
"description": "Código de motivo BACEN"
},
"reason_text": {
"type": "string"
}
},
"required": [
"amount",
"reason_code"
]
}Headers
Content-Type: application/jsonBody
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"return_id": "D1234567820260124103012345abcde",
"original_payment_id": 123,
"original_end_to_end_id": "E8765432120260123103012345abcde",
"amount": "100.00",
"reason_code": "FR01",
"status": "REQUESTED",
"created_at": "2026-01-24T10:30:12Z"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"return_id": {
"type": "string"
},
"original_payment_id": {
"type": "number"
},
"original_end_to_end_id": {
"type": "string"
},
"amount": {
"type": "string"
},
"reason_code": {
"type": "string"
},
"status": {
"type": "string"
},
"created_at": {
"type": "string"
}
},
"required": [
"id",
"return_id",
"original_payment_id",
"original_end_to_end_id",
"amount",
"reason_code",
"status",
"created_at"
]
}Criar DevoluçãoPOST/api/v1/payments/{id}/return
Cria uma devolução para um pagamento.
- id
string(required) Example: 123ID do Pagamento Original ou EndToEndId
Lista de Devoluções de Pagamento ¶
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
{
"payment_id": 123,
"original_end_to_end_id": "E8765432120260123103012345abcde",
"returns": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"return_id": "D1234567820260124103012345abcde",
"amount": "50.00",
"reason_code": "AM09",
"status": "SETTLED",
"created_at": "2026-01-24T10:30:12Z"
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"payment_id": {
"type": "number"
},
"original_end_to_end_id": {
"type": "string"
},
"returns": {
"type": "array"
}
},
"required": [
"payment_id",
"original_end_to_end_id",
"returns"
]
}Listar Devoluções por PagamentoGET/api/v1/payments/{id}/returns
Lista todas as devoluções de um pagamento específico.
- id
string(required) Example: 123ID do Pagamento ou EndToEndId
Resumo de Devolução de Pagamento ¶
Headers
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Headers
Content-Type: application/jsonBody
{
"payment_id": 123,
"original_amount": "100.00",
"total_returned": "50.00",
"remaining_amount": "50.00",
"return_count": 1,
"can_return": true,
"last_return_at": "2026-01-24T10:30:12Z"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"payment_id": {
"type": "number"
},
"original_amount": {
"type": "string"
},
"total_returned": {
"type": "string"
},
"remaining_amount": {
"type": "string"
},
"return_count": {
"type": "number"
},
"can_return": {
"type": "boolean"
},
"last_return_at": {
"type": "string"
}
},
"required": [
"payment_id",
"original_amount",
"total_returned",
"remaining_amount",
"return_count",
"can_return"
]
}Obter Resumo de DevoluçãoGET/api/v1/payments/{id}/return-summary
Obtém resumo de devolução de um pagamento.
- id
string(required) Example: 123ID do Pagamento ou EndToEndId
Conectividade ¶
Operações de teste de conectividade BACEN.
Teste de Echo ¶
Headers
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...Body
{
"ispb": "12345678"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"ispb": {
"type": "string"
}
},
"required": [
"ispb"
]
}Headers
Content-Type: application/jsonBody
{
"ispb": "12345678",
"status": "success",
"message_id": "ECHO1234567820260124103012345",
"resource_id": "R1234567820260124103015abcdefgh",
"latency_ms": 85,
"timestamp": "2026-01-24T10:30:12Z"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"ispb": {
"type": "string"
},
"status": {
"type": "string"
},
"message_id": {
"type": "string"
},
"resource_id": {
"type": "string"
},
"latency_ms": {
"type": "number"
},
"timestamp": {
"type": "string"
}
},
"required": [
"ispb",
"status",
"message_id",
"resource_id",
"latency_ms",
"timestamp"
]
}Headers
Content-Type: application/jsonBody
{
"ispb": "12345678",
"status": "failed",
"error": "Serviço BACEN indisponível",
"timestamp": "2026-01-24T10:30:12Z"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"ispb": {
"type": "string"
},
"status": {
"type": "string"
},
"error": {
"type": "string"
},
"timestamp": {
"type": "string"
}
},
"required": [
"ispb",
"status",
"error",
"timestamp"
]
}EchoPOST/api/v1/echo
Envia teste de echo/conectividade pibr.001 para o BACEN.
Generated by aglio on 24 Jan 2026