Pular para o conteúdo principal

Criar QR Code Pix dinâmico

Request

ENDPOINT
/baas/qrcode/dynamic
MÉTODO
POST
Request Body: Com vencimento
{
"account_key": "f0d363be-fc49-4cfc-a1f8-c8d4d4195095",
"amount": 22.34,
"occurrence_type": "registration",
"payer_document_number": "00000000000000",
"payer_name": "Random",
"payer_person_type": "legal",
"payer_request": "Payment for order XXXXXXXXXX",
"pix_key": "3d7d6a2b-f72f-44z7-bb20-79a94dff5645",
"qr_code_type": "dynamic_term",
"additional_data": [
{
"key_name": "Juros e Multa",
"value": "Juros 2 ao mes e multa de 1%"
}
],
"fine_amount": 3,
"interest_amount": 2,
"expiration_date": "2023-03-25",
"max_payment_days": 128,
"rebate_amount": 1,
"discounts": []
}

Request Body: Pagamento imediato
{
"account_key": "f0d363be-fc49-4cfc-a1f8-c8d4d4195095",
"amount": 22.34,
"expiration_seconds": 864000,
"occurrence_type": "registration",
"payer_document_number": "00000000000000",
"payer_name": "Random",
"payer_person_type": "legal",
"payer_request": "Payment for order XXXXXXXXXX",
"pix_key": "3d7d6a2b-f72f-44z7-bb20-79a94dff5645",
"qr_code_type": "dynamic_instant",
"additional_data": [
{
"key_name": "Juros e Multa",
"value": "Juros 2 ao mes e multa de 1%"
}
],
"fine_amount": 3,
"interest_amount": 2,
"max_payment_days": 128,
"rebate_amount": 1,
"discounts": []
}

Body Params

CampoTipoDescriçãoCaracteres
amount *floatValor do QR Code antes do cálculo de descontos ou juros e multas.-
occurrence_type *stringTipo de ocorrencia. payment: Ocorrência do tipo pagamento, registration: Ocorrência do tipo registro, write_off: Ocorrência do tipo cancelamento pelo gerador, bank_written_off: Ocorrência do tipo cancelamento pelo banco.-
qr_code_type *stringTipo do QR Code dinâmico-
pix_key *stringChave Pix que representa a conta de destino da transação.-
expiration_datedateData de vencimento da cobrança (no formato "YYYY-MM-DD"-
expiration_secondsstringindica qual o tempo de validad e do QR Code em segundos, padrão 1 dia.-
payer_name *stringNome do pagador.-
payer_document_number *stringCPF do pagador.-
payer_person_type *stringTipo de pessoa (natural = física ou legal = jurídica).-
payer_request *stringMensagem ao pagador.-
additional_data *array of objectsInformações que serão apresentadas para o pagador.-
max_payment_days *int32Dias máximo para pagamento da cobrança.-
rebate_amount *floatValor absoluto de abatimento antes do pagamento.-
interest_amount *floatValor absoluto por dia de atraso após o vencimento, caso seja pago um dia após o vencimento o valor total será o valor ordinario + multa.-
fine_amount *floatMulta em valor absoluto após o vencimento.-
discounts *array of objectsConfigurações de desconto.-

Objeto additional_data

CampoTipoDescriçãoCaracteres
key_name *stringNome do campo-
valuestringValor do campo-

Objeto discount

CampoTipoDescriçãoCaracteres
discount_value *floatValor do desconto.-
discount_numberint32Ordem que o desconto deve ser aplicado.-
discount_limit_datestringData limite do desconto.-

Response

STATUS
200
Response Body: Com vencimento
{
"qr_code_type": "dynamic_instant",
"amount": 22.34,
"expiration_seconds": null,
"max_payment_days": null,
"receiver_conciliation_id": "01GVGV9NXBCY287Z6CJ4S0ENW9",
"payer_name": "Random",
"payer_document_number": "00000000000000",
"payer_person_type": "legal",
"payer_request": "Payment for order XXXXXXXXXXXX",
"pix_message": null,
"modality_alteration": false,
"expiration_date": "2023-03-25",
"rebate_amount": 1,
"interest_amount": 2,
"fine_amount": 3,
"paid_amount": null,
"discounts": [],
"additional_data": [],
"origin": "system",
"origin_key": null,
"pix_key": "3d7d6a2b-f72f-44z7-bb20-79a94dff5645",
"qr_code_key": "6fd14834-03e3-4777-b907-d2c43d4c2a1e",
"occurrence_type": "registration",
"end_to_end_id": null,
"source_account_branch": null,
"source_account_financial_institution": null,
"source_account_ispb": null,
"source_account_number": null,
"source_account_digit": null,
"disable": null,
"qr_code_occurrence_key": "38c55754-2c26-4065-aa21-240c6b9a8ce7",
"base_64": "\<BASE64 DA URI DO PIX COPIA E COLA\>",
"image": "\<BASE64 DA IMAGEM\>"
}

STATUS
200
Response Body: Pagamento imediato
{
"qr_code_type": "dynamic_instant",
"amount": 22.34,
"expiration_seconds": 864000,
"max_payment_days": null,
"receiver_conciliation_id": "01GVGV9NXBCY287Z6CJ4S0ENW9",
"payer_name": "Random",
"payer_document_number": "00000000000000",
"payer_person_type": "legal",
"payer_request": "Payment for order XXXXXXXXXXXX",
"pix_message": null,
"modality_alteration": false,
"expiration_date": null,
"rebate_amount": 1,
"interest_amount": 2,
"fine_amount": 3,
"paid_amount": null,
"discounts": [],
"additional_data": [],
"origin": "system",
"origin_key": null,
"pix_key": "3d7d6a2b-f72f-44z7-bb20-79a94dff5645",
"qr_code_key": "6fd14834-03e3-4777-b907-d2c43d4c2a1e",
"occurrence_type": "registration",
"end_to_end_id": null,
"source_account_branch": null,
"source_account_financial_institution": null,
"source_account_ispb": null,
"source_account_number": null,
"source_account_digit": null,
"disable": null,
"qr_code_occurrence_key": "38c55754-2c26-4065-aa21-240c6b9a8ce7",
"base_64": "\<BASE64 DA URI DO PIX COPIA E COLA\>",
"image": "\<BASE64 DA IMAGEM\>"
}

STATUS
400
Response Body
{
"data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}