Create dynamic QR Code
Request
ENDPOINT
/baas/qrcode/dynamicMETHOD
POSTRequest Body: With expiration date
{
"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: Immediate payment
{
"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
Field | Type | Description | Characters |
---|---|---|---|
amount * | float | QR Code amount before calculating discounts or interest and fines. | - |
occurrence_type * | string | Type of occurrence. payment: Payment occurrence, registration: Registration occurrence, write_off: Generator cancellation occurrence, bank_written_off: Bank cancellation occurrence. | - |
qr_code_type * | string | Type of dynamic QR Code | - |
pix_key * | string | Pix key representing the destination account of the transaction. | - |
expiration_date | date | Due date of the charge (in the format "YYYY-MM-DD") | - |
expiration_seconds | string | Indicates the validity time of the QR Code in seconds, default is 1 day. | - |
payer_name * | string | Name of the payer. | - |
payer_document_number * | string | Payer's CPF. | - |
payer_person_type * | string | Type of person (natural = individual or legal = entity). | - |
payer_request * | string | Message to the payer. | - |
additional_data * | array of objects | Information that will be presented to the payer. | - |
max_payment_days * | int32 | Maximum days for charge payment. | - |
rebate_amount * | float | Absolute rebate amount before payment. | - |
interest_amount * | float | Absolute amount per day of delay after the due date, if paid a day after the due date the total amount will be the ordinary amount + fine. | - |
fine_amount * | float | Fine in absolute value after the due date. | - |
discounts * | array of objects | Discount settings. | - |
Object additional_data
Field | Type | Description | Characters |
---|---|---|---|
key_name * | string | Field name | - |
value | string | Field value | - |
Object discount
Field | Type | Description | Characters |
---|---|---|---|
discount_value * | float | Discount value. | - |
discount_number | int32 | Order in which the discount should be applied. | - |
discount_limit_date | string | Discount limit date. | - |
Response
STATUS
200Response Body: With expiration date
{
"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": "\<URI from Pix copia e cola\>",
"image": "\<BASE64 IMAGE\>"
}
STATUS
200Response Body: Immediate payment
{
"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": "\<URI from Pix copia e cola\>",
"image": "\<BASE64 IMAGE\>"
}
STATUS
400Response Body
{
"data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}