API Docs Início Documentação Referência de API Copiar para LLM
POST/v1/BankAccount/{id}/Pix/QRCode/DynamicWithDueDate
Banking · PIX

Gerar PIX QRCode dinâmico com data de vencimento

Cria um novo registro de Bank Account.

Visão geral

Gerar PIX QRCode dinâmico com data de vencimento

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
txIdstringopcional"3fa85f64-5717-4562-b3fc-2c963f66afa6"
beneficiaryobjetoopcionalobjeto — ver detalhe abaixo{ … }
payerobjetoopcionalobjeto — ver detalhe abaixo{ … }
valueobjetoopcionalobjeto — ver detalhe abaixo{ … }
expirationDatestring (date-time)opcional"2025-08-11T13:45:00Z"
discountLimitDatestring (date-time)opcional"2025-08-11T13:45:00Z"

Detalhe de beneficiary

CampoTipoObrigatórioDescriçãoValoresExemplo
pixKeyobjetoopcionalobjeto — ver detalhe abaixo{ … }

Detalhe de payer

CampoTipoObrigatórioDescriçãoValoresExemplo
namestringopcional"Fulano de Tal"
emailstringopcional"cliente@exemplo.com.br"
registrationNumberstringopcional"12345678909"
citystringopcional"texto"
zipCodestringopcional"01310930"
addressNumberstringopcional"texto"
ufstringopcionalNaoSelecionado, AC, AL, AP, AM, BA, CE, DF, ES, GO, MA, MT, MS, MG +14"NaoSelecionado"

Detalhe de value

CampoTipoObrigatórioDescriçãoValoresExemplo
originalValueInCentsinteger (int64)opcional0
interestValueInCentsinteger (int64)opcional0
assessmentValueInCentsinteger (int64)opcional0
discountValueInCentsinteger (int64)opcional0
rebateValueInCentsinteger (int64)opcional0

Detalhe de pixKey

CampoTipoObrigatórioDescriçãoValoresExemplo
typestringopcionalNaturalRegistrationNumber, LegalRegistrationNumber, Phone, Email, Automatic"NaturalRegistrationNumber"
keystringopcional"texto"
descriptionTypestringopcional"texto"
formattedKeystringopcional"texto"

Exemplo de corpo

{
  "txId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "beneficiary": {
    "pixKey": {
      "type": "NaturalRegistrationNumber",
      "key": "texto",
      "descriptionType": "texto",
      "formattedKey": "texto"
    }
  },
  "payer": {
    "name": "Fulano de Tal",
    "email": "cliente@exemplo.com.br",
    "registrationNumber": "12345678909",
    "city": "texto",
    "zipCode": "01310930",
    "addressNumber": "texto",
    "uf": "NaoSelecionado"
  },
  "value": {
    "originalValueInCents": 0,
    "interestValueInCents": 0,
    "assessmentValueInCents": 0,
    "discountValueInCents": 0,
    "rebateValueInCents": 0
  },
  "expirationDate": "2025-08-11T13:45:00Z",
  "discountLimitDate": "2025-08-11T13:45:00Z"
}

Response

Resposta 200.

Campos

CampoTipoObrigatórioDescriçãoValoresExemplo
qrCodestringopcional"texto"

Exemplo de resposta

{
  "qrCode": "texto"
}

Códigos de retorno

CódigoSignificadoDetalhe do contrato
200Requisição bem-sucedida.

Exemplos

curl -X POST "{{baseUrl}}/v1/BankAccount/3fa85f64-5717-4562-b3fc-2c963f66afa6/Pix/QRCode/DynamicWithDueDate" \
  -H "Authorization: Bearer {{token}}" \
  -H "Content-Type: application/json" \
  -d '{
  "txId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "beneficiary": {
    "pixKey": {
      "type": "NaturalRegistrationNumber",
      "key": "texto",
      "descriptionType": "texto",
      "formattedKey": "texto"
    }
  },
  "payer": {
    "name": "Fulano de Tal",
    "email": "cliente@exemplo.com.br",
    "registrationNumber": "12345678909",
    "city": "texto",
    "zipCode": "01310930",
    "addressNumber": "texto",
    "uf": "NaoSelecionado"
  },
  "value": {
    "originalValueInCents": 0,
    "interestValueInCents": 0,
    "assessmentValueInCents": 0,
    "discountValueInCents": 0,
    "rebateValueInCents": 0
  },
  "expirationDate": "2025-08-11T13:45:00Z",
  "discountLimitDate": "2025-08-11T13:45:00Z"
}'
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/Pix/QRCode/DynamicWithDueDate";

var corpo = new StringContent(
    """
    {
      "txId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "beneficiary": {
        "pixKey": {
          "type": "NaturalRegistrationNumber",
          "key": "texto",
          "descriptionType": "texto",
          "formattedKey": "texto"
        }
      },
      "payer": {
        "name": "Fulano de Tal",
        "email": "cliente@exemplo.com.br",
        "registrationNumber": "12345678909",
        "city": "texto",
        "zipCode": "01310930",
        "addressNumber": "texto",
        "uf": "NaoSelecionado"
      },
      "value": {
        "originalValueInCents": 0,
        "interestValueInCents": 0,
        "assessmentValueInCents": 0,
        "discountValueInCents": 0,
        "rebateValueInCents": 0
      },
      "expirationDate": "2025-08-11T13:45:00Z",
      "discountLimitDate": "2025-08-11T13:45:00Z"
    }
    """,
    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 = {
  "txId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "beneficiary": {
    "pixKey": {
      "type": "NaturalRegistrationNumber",
      "key": "texto",
      "descriptionType": "texto",
      "formattedKey": "texto"
    }
  },
  "payer": {
    "name": "Fulano de Tal",
    "email": "cliente@exemplo.com.br",
    "registrationNumber": "12345678909",
    "city": "texto",
    "zipCode": "01310930",
    "addressNumber": "texto",
    "uf": "NaoSelecionado"
  },
  "value": {
    "originalValueInCents": 0,
    "interestValueInCents": 0,
    "assessmentValueInCents": 0,
    "discountValueInCents": 0,
    "rebateValueInCents": 0
  },
  "expirationDate": "2025-08-11T13:45:00Z",
  "discountLimitDate": "2025-08-11T13:45:00Z"
};

const resp = await fetch(`${baseUrl}/v1/BankAccount/3fa85f64-5717-4562-b3fc-2c963f66afa6/Pix/QRCode/DynamicWithDueDate`, {
  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