API Docs Início Documentação Referência de API Copiar para LLM
POST/v1/BankAccount/{id}/Pay/DARF
Banking · Transferências

Solicitar o pagamento de um boleto de tributo DARF sem código de barras

Cria um novo registro de Bank Account.

Visão geral

Solicitar o pagamento de um boleto de tributo DARF sem código de barras

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):

Request

Parâmetros

NomeEmTipoObrigatórioDescriçãoExemplo
idpathstringobrigatório3fa85f64-5717-4562-b3fc-2c963f66afa6

Corpo da requisição

Envie no formato application/json. Corpo obrigatório.

Campos

CampoTipoObrigatórioDescriçãoValoresExemplo
identificationOperationStatementstringopcional"texto"
paymentValueinteger (int64)obrigatório0
paymentDatestring (date-time)obrigatório"2025-08-11T13:45:00Z"
namestringobrigatório"Fulano de Tal"
calculationPeriodstring (date-time)obrigatório"2025-08-11T13:45:00Z"
registrationNumberstringobrigatório"12345678909"
receitaFederalCodeIdstringobrigatório"3fa85f64-5717-4562-b3fc-2c963f66afa6"
referenceNumberstringopcional"texto"
dueDatestring (date-time)obrigatório"2025-08-11T13:45:00Z"
principalValueinteger (int64)obrigatório0
assessmentValueinteger (int64)obrigatório0
interestValueinteger (int64)obrigatório0
interestAndChargesValueinteger (int64)obrigatório0
totalValueinteger (int64)obrigatório0
sessionIdstringopcional"3fa85f64-5717-4562-b3fc-2c963f66afa6"
codestringopcional"texto"

Exemplo de corpo

{
  "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

CampoTipoObrigatórioDescriçãoValoresExemplo
idstringopcional"texto"
createdAtstring (date-time)opcional"2025-08-11T13:45:00Z"
createdByobjetoopcionalvaria conforme o tipo — ver exemplo{ … }
tenantstringopcional"texto"
tenantDisplaystringopcional"texto"
updatedAtstring (date-time)opcional"2025-08-11T13:45:00Z"
updatedByobjetoopcionalvaria conforme o tipo — ver exemplo{ … }
ownerUserobjetoopcionalvaria conforme o tipo — ver exemplo{ … }
ownerGroupobjetoopcionalvaria conforme o tipo — ver exemplo{ … }
bankAccountIdstringopcional"3fa85f64-5717-4562-b3fc-2c963f66afa6"
barCodestringopcional"texto"
nsustringopcional"texto"
amountinteger (int64)opcional0
datestring (date-time)opcional"2025-08-11T13:45:00Z"
paymentPurposeobjetoopcionalvaria conforme o tipo — ver exemplo"PagamentoDeImpostosTributosETaxas"
paymentPurposeDisplaystringopcional"texto"
statusstringopcionalApproved, Pending, Rejected, Timeout, Canceled, Error, Processing, Finished, Scheduled, Reversed, ComplianceApproval, CancellationRequested"Approved"
statusDisplaystringopcional"texto"
errorMessagestringopcional"texto"
authorizedAtstring (date-time)opcional"2025-08-11T13:45:00Z"
requesterobjetoopcionalobjeto — ver detalhe abaixo{ … }
approvalsarray de objetoopcionalobjeto — ver detalhe abaixo[ … ]

Detalhe de requester

CampoTipoObrigatórioDescriçãoValoresExemplo
userIdstringopcional"3fa85f64-5717-4562-b3fc-2c963f66afa6"
registrationNumberstringopcional"12345678909"
userIdDisplaystringopcional"texto"
tenantDisplaystringopcional"texto"
tenantNamestringopcional"Fulano de Tal"

Detalhe de approvals

CampoTipoObrigatórioDescriçãoValoresExemplo
levelobjetoopcionalvaria conforme o tipo — ver exemplo"Viewer"
actionstringopcionalApprove, Reject, Cancel"Approve"
actionDisplaystringopcional"texto"
userobjetoopcionalvaria 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ódigoSignificadoDetalhe do contrato
200Requisição bem-sucedida.

Exemplos

curl -X POST "{{baseUrl}}/v1/BankAccount/3fa85f64-5717-4562-b3fc-2c963f66afa6/Pay/DARF" \
  -H "Authorization: Bearer {{token}}" \
  -H "Content-Type: application/json" \
  -d '{
  "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/DARF";

var corpo = new StringContent(
    """
    {
      "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 = {
  "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/DARF`, {
  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