Skip to main content

Create dynamic QR Code

Request

ENDPOINT
/baas/qrcode/dynamic
METHOD
POST
Request 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

FieldTypeDescriptionCharacters
amount *floatQR Code amount before calculating discounts or interest and fines.-
occurrence_type *stringType of occurrence. payment: Payment occurrence, registration: Registration occurrence, write_off: Generator cancellation occurrence, bank_written_off: Bank cancellation occurrence.-
qr_code_type *stringType of dynamic QR Code-
pix_key *stringPix key representing the destination account of the transaction.-
expiration_datedateDue date of the charge (in the format "YYYY-MM-DD")-
expiration_secondsstringIndicates the validity time of the QR Code in seconds, default is 1 day.-
payer_name *stringName of the payer.-
payer_document_number *stringPayer's CPF.-
payer_person_type *stringType of person (natural = individual or legal = entity).-
payer_request *stringMessage to the payer.-
additional_data *array of objectsInformation that will be presented to the payer.-
max_payment_days *int32Maximum days for charge payment.-
rebate_amount *floatAbsolute rebate amount before payment.-
interest_amount *floatAbsolute 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 *floatFine in absolute value after the due date.-
discounts *array of objectsDiscount settings.-

Object additional_data

FieldTypeDescriptionCharacters
key_name *stringField name-
valuestringField value-

Object discount

FieldTypeDescriptionCharacters
discount_value *floatDiscount value.-
discount_numberint32Order in which the discount should be applied.-
discount_limit_datestringDiscount limit date.-

Response

STATUS
200
Response 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
200
Response 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
400
Response Body
{
"data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}