/v1/BankAccount/{id}/Pay/DARFWithBarCodeSolicitar o pagamento de um boleto de tributo DARF através do código de barras e…
Cria um novo registro de Bank Account.
Visão geral
Solicitar o pagamento de um boleto de tributo DARF através do código de barras e linha digitável
Autenticação e pré-requisitos
Requer autenticação. Envie o token no header Authorization: Bearer {{token}} (JWT do AWS Cognito). Integrações servidor-a-servidor podem usar X-Api-Key. Todo tráfego é HTTPS e a credencial nunca vai na URL nem em query string.
Pré-requisitos: a rota exige identificador(es) de recurso já existente(s):
id— —
Request
Parâmetros
| Nome | Em | Tipo | Obrigatório | Descrição | Exemplo |
|---|---|---|---|---|---|
id | path | string | obrigatório | — | 3fa85f64-5717-4562-b3fc-2c963f66afa6 |
Corpo da requisição
Envie no formato application/json. Corpo obrigatório.
Campos
| Campo | Tipo | Obrigatório | Descrição | Valores | Exemplo |
|---|---|---|---|---|---|
barCodeOrDigitableLine | string | obrigatório | — | — | "texto" |
identificationOperationStatement | string | opcional | — | — | "texto" |
paymentValue | integer (int64) | obrigatório | — | — | 0 |
paymentDate | string (date-time) | obrigatório | — | — | "2025-08-11T13:45:00Z" |
name | string | obrigatório | — | — | "Fulano de Tal" |
calculationPeriod | string (date-time) | obrigatório | — | — | "2025-08-11T13:45:00Z" |
registrationNumber | string | obrigatório | — | — | "12345678909" |
receitaFederalCodeId | string | obrigatório | — | — | "3fa85f64-5717-4562-b3fc-2c963f66afa6" |
referenceNumber | string | opcional | — | — | "texto" |
dueDate | string (date-time) | obrigatório | — | — | "2025-08-11T13:45:00Z" |
principalValue | integer (int64) | obrigatório | — | — | 0 |
assessmentValue | integer (int64) | obrigatório | — | — | 0 |
interestValue | integer (int64) | obrigatório | — | — | 0 |
interestAndChargesValue | integer (int64) | obrigatório | — | — | 0 |
totalValue | integer (int64) | obrigatório | — | — | 0 |
sessionId | string | opcional | — | — | "3fa85f64-5717-4562-b3fc-2c963f66afa6" |
code | string | opcional | — | — | "texto" |
Exemplo de corpo
{
"barCodeOrDigitableLine": "texto",
"identificationOperationStatement": "texto",
"paymentValue": 0,
"paymentDate": "2025-08-11T13:45:00Z",
"name": "Fulano de Tal",
"calculationPeriod": "2025-08-11T13:45:00Z",
"registrationNumber": "12345678909",
"receitaFederalCodeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"referenceNumber": "texto",
"dueDate": "2025-08-11T13:45:00Z",
"principalValue": 0,
"assessmentValue": 0,
"interestValue": 0,
"interestAndChargesValue": 0,
"totalValue": 0,
"sessionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"code": "texto"
}Response
Resposta 200.
Campos
| Campo | Tipo | Obrigatório | Descrição | Valores | Exemplo |
|---|---|---|---|---|---|
id | string | opcional | — | — | "texto" |
createdAt | string (date-time) | opcional | — | — | "2025-08-11T13:45:00Z" |
createdBy | objeto | opcional | — | varia conforme o tipo — ver exemplo | { … } |
tenant | string | opcional | — | — | "texto" |
tenantDisplay | string | opcional | — | — | "texto" |
updatedAt | string (date-time) | opcional | — | — | "2025-08-11T13:45:00Z" |
updatedBy | objeto | opcional | — | varia conforme o tipo — ver exemplo | { … } |
ownerUser | objeto | opcional | — | varia conforme o tipo — ver exemplo | { … } |
ownerGroup | objeto | opcional | — | varia conforme o tipo — ver exemplo | { … } |
bankAccountId | string | opcional | — | — | "3fa85f64-5717-4562-b3fc-2c963f66afa6" |
barCode | string | opcional | — | — | "texto" |
nsu | string | opcional | — | — | "texto" |
amount | integer (int64) | opcional | — | — | 0 |
date | string (date-time) | opcional | — | — | "2025-08-11T13:45:00Z" |
paymentPurpose | objeto | opcional | — | varia conforme o tipo — ver exemplo | "PagamentoDeImpostosTributosETaxas" |
paymentPurposeDisplay | string | opcional | — | — | "texto" |
status | string | opcional | — | Approved, Pending, Rejected, Timeout, Canceled, Error, Processing, Finished, Scheduled, Reversed, ComplianceApproval, CancellationRequested | "Approved" |
statusDisplay | string | opcional | — | — | "texto" |
errorMessage | string | opcional | — | — | "texto" |
authorizedAt | string (date-time) | opcional | — | — | "2025-08-11T13:45:00Z" |
requester | objeto | opcional | — | objeto — ver detalhe abaixo | { … } |
approvals | array de objeto | opcional | — | objeto — ver detalhe abaixo | [ … ] |
Detalhe de requester
| Campo | Tipo | Obrigatório | Descrição | Valores | Exemplo |
|---|---|---|---|---|---|
userId | string | opcional | — | — | "3fa85f64-5717-4562-b3fc-2c963f66afa6" |
registrationNumber | string | opcional | — | — | "12345678909" |
userIdDisplay | string | opcional | — | — | "texto" |
tenantDisplay | string | opcional | — | — | "texto" |
tenantName | string | opcional | — | — | "Fulano de Tal" |
Detalhe de approvals
| Campo | Tipo | Obrigatório | Descrição | Valores | Exemplo |
|---|---|---|---|---|---|
level | objeto | opcional | — | varia conforme o tipo — ver exemplo | "Viewer" |
action | string | opcional | — | Approve, Reject, Cancel | "Approve" |
actionDisplay | string | opcional | — | — | "texto" |
user | objeto | opcional | — | varia conforme o tipo — ver exemplo | { … } |
Exemplo de resposta
{
"id": "texto",
"createdAt": "2025-08-11T13:45:00Z",
"createdBy": {
"userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"registrationNumber": "12345678909",
"userIdDisplay": "texto",
"tenantDisplay": "texto",
"tenantName": "Fulano de Tal"
},
"tenant": "texto",
"tenantDisplay": "texto",
"updatedAt": "2025-08-11T13:45:00Z",
"updatedBy": {
"userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"registrationNumber": "12345678909",
"userIdDisplay": "texto",
"tenantDisplay": "texto",
"tenantName": "Fulano de Tal"
},
"ownerUser": {
"userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"registrationNumber": "12345678909",
"userIdDisplay": "texto",
"tenantDisplay": "texto",
"tenantName": "Fulano de Tal"
},
"ownerGroup": {
"groupDisplay": "texto",
"tenantDisplay": "texto"
},
"bankAccountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"barCode": "texto",
"nsu": "texto",
"amount": 0,
"date": "2025-08-11T13:45:00Z",
"paymentPurpose": "PagamentoDeImpostosTributosETaxas",
"paymentPurposeDisplay": "texto",
"status": "Approved",
"statusDisplay": "texto",
"errorMessage": "texto",
"authorizedAt": "2025-08-11T13:45:00Z",
"requester": {
"userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"registrationNumber": "12345678909",
"userIdDisplay": "texto",
"tenantDisplay": "texto",
"tenantName": "Fulano de Tal"
},
"approvals": [
{
"level": "Viewer",
"action": "Approve",
"actionDisplay": "texto",
"user": {
"userId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"registrationNumber": "12345678909",
"userIdDisplay": "texto",
"tenantDisplay": "texto",
"tenantName": "Fulano de Tal"
}
}
]
}Códigos de retorno
| Código | Significado | Detalhe do contrato |
|---|---|---|
200 | Requisição bem-sucedida. | — |
Exemplos
curl -X POST "{{baseUrl}}/v1/BankAccount/3fa85f64-5717-4562-b3fc-2c963f66afa6/Pay/DARFWithBarCode" \
-H "Authorization: Bearer {{token}}" \
-H "Content-Type: application/json" \
-d '{
"barCodeOrDigitableLine": "texto",
"identificationOperationStatement": "texto",
"paymentValue": 0,
"paymentDate": "2025-08-11T13:45:00Z",
"name": "Fulano de Tal",
"calculationPeriod": "2025-08-11T13:45:00Z",
"registrationNumber": "12345678909",
"receitaFederalCodeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"referenceNumber": "texto",
"dueDate": "2025-08-11T13:45:00Z",
"principalValue": 0,
"assessmentValue": 0,
"interestValue": 0,
"interestAndChargesValue": 0,
"totalValue": 0,
"sessionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"code": "texto"
}'var baseUrl = "{{baseUrl}}";
var token = "{{token}}";
using var http = new HttpClient { BaseAddress = new Uri(baseUrl) };
http.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", token);
var rota = "/v1/BankAccount/3fa85f64-5717-4562-b3fc-2c963f66afa6/Pay/DARFWithBarCode";
var corpo = new StringContent(
"""
{
"barCodeOrDigitableLine": "texto",
"identificationOperationStatement": "texto",
"paymentValue": 0,
"paymentDate": "2025-08-11T13:45:00Z",
"name": "Fulano de Tal",
"calculationPeriod": "2025-08-11T13:45:00Z",
"registrationNumber": "12345678909",
"receitaFederalCodeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"referenceNumber": "texto",
"dueDate": "2025-08-11T13:45:00Z",
"principalValue": 0,
"assessmentValue": 0,
"interestValue": 0,
"interestAndChargesValue": 0,
"totalValue": 0,
"sessionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"code": "texto"
}
""",
Encoding.UTF8, "application/json");
var resp = await http.PostAsync(rota, corpo);
resp.EnsureSuccessStatusCode();
var json = await resp.Content.ReadAsStringAsync();const baseUrl = '{{baseUrl}}';
const token = '{{token}}';
const payload = {
"barCodeOrDigitableLine": "texto",
"identificationOperationStatement": "texto",
"paymentValue": 0,
"paymentDate": "2025-08-11T13:45:00Z",
"name": "Fulano de Tal",
"calculationPeriod": "2025-08-11T13:45:00Z",
"registrationNumber": "12345678909",
"receitaFederalCodeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"referenceNumber": "texto",
"dueDate": "2025-08-11T13:45:00Z",
"principalValue": 0,
"assessmentValue": 0,
"interestValue": 0,
"interestAndChargesValue": 0,
"totalValue": 0,
"sessionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"code": "texto"
};
const resp = await fetch(`${baseUrl}/v1/BankAccount/3fa85f64-5717-4562-b3fc-2c963f66afa6/Pay/DARFWithBarCode`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json',
},
body: JSON.stringify(payload),
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
const data = await resp.json();Troque apenas {{baseUrl}} e {{token}}. No Postman, defina-os como variáveis de environment; o cURL importa em Import > Raw text.
Downloads
Este endpoint já vem configurado nas collections abaixo, na pasta da etapa correspondente.
Guia de importação: Como importar no Postman · Todos os downloads: Downloads