创建动态 Pix QR Code
Request
ENDPOINT
/baas/qrcode/dynamicMÉTODO
POSTRequest Body: 带到期日
{
"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",
"receiver_conciliation_id": "3d7d6a2bf72f44z7bb2079a94dff5645",
"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: 即时付款
{
"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",
"receiver_conciliation_id": "3d7d6a2bf72f44z7bb2079a94dff5645",
"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
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
amount * | float | 计算折扣、利息和罚款之前的 QR Code 金额。 | - |
occurrence_type * | string | 事件类型。payment:付款类型事件,registration:登记类型事件,write_off:生成方取消类型事件,bank_written_off:银行取消类型事件。 | - |
qr_code_type * | string | 动态 QR Code 类型 | - |
pix_key * | string | 代表交易目标账户的 Pix 密钥。 | - |
receiver_conciliation_id * | string | 对账唯一标识符 | 32 |
expiration_date | date | 账单到期日期(格式为 "YYYY-MM-DD") | - |
expiration_seconds | string | 表示 QR Code 的有效时间(秒),默认为 1 天。 | - |
payer_name * | string | 付款方姓名。 | - |
payer_document_number * | string | 付款方 CPF。 | - |
payer_person_type * | string | 人员类型(natural = 自然人 或 legal = 法人)。 | - |
payer_request * | string | 给付款方的消息。 | - |
additional_data * | array of objects | 将呈现给付款方的信息。 | - |
max_payment_days * | int32 | 账单最大付款天数。 | - |
rebate_amount * | float | 付款前的绝对折让金额。 | - |
interest_amount * | float | 到期后每日逾期的绝对利息值,若到期后一天付款,总金额将为基础金额加罚款。 | - |
fine_amount * | float | 到期后绝对值罚款。 | - |
discounts * | array of objects | 折扣配置。 | - |
additional_data 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
key_name * | string | 字段名称 | - |
value | string | 字段值 | - |
discount 对象
| 字段 | 类型 | 描述 | 字符数 |
|---|---|---|---|
discount_value * | float | 折扣值。 | - |
discount_number | int32 | 折扣应用顺序。 | - |
discount_limit_date | string | 折扣截止日期。 | - |
Response
STATUS
200Response Body: 带到期日
{
"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
200Response Body: 即时付款
{
"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
400Response Body
{
"data": "{\"title\": \"Bad Request\", \"description\": \"Invalid request body.\", \"translation\": \"Corpo da requisição inválido.\", \"extra_fields\": {}, \"code\": \"LEG000069\"}"
}