Create Payment / QR Code
Create a PIX payment order and obtain a QR Code payload.
Endpoint
POST/cashin/pix/create-qrcodeAuthentication
Merchant Credential. See Authentication.
Request headers
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
Content-Type | header | string | Yes | application/json | |
X-Nonce | header | string | Yes | a9f3c1d47e8b9a2c4d1f9e8a7b6c5d4e | |
X-Merchant-Id | header | string | Yes | 2492265300 | |
X-Timestamp | header | string | Yes | 1638123456 | |
Digest | header | string | Yes | SHA-256=Jr9cX0nM6yT7uF9GQ5G8ZC5M8vRZrQZP9+VbQ8Z8z0Q= | |
Authorization | header | string | Yes | Signature keyId="m123456",alg="ES256",headers="(request-target) x-timestamp x-nonce digest",signature="MEUCIQD8VxkzR7q5hF3k9dY0v6mKk7K0Nq9nYw+7Ck8LJr9mYAIgC5VQ7J0Z9YqL5F8Wc6E2Yw5qf1z8bYyYcR9kX8pY=" |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Order amount — Unit: Brazilian Real (BRL), up to 2 decimal places (min=10; max=50000) |
mchOrderNo | string | Yes | Merchant order number — Merchant order number (maxLength=32; pattern=^[A-Za-z0-9|_|-]{1-32}) |
expireTime | integer | No | Expiration timestamp; defaults to 30 minutes |
payerName | string | No | Name |
payerDocument | string | No | Tax ID — Use CPF for individuals and CNPJ for companies. The value must be real and valid |
Request example
json
{
"mchOrderNo": "order_1770134058",
"amount": 1,
"payerDocument": "47929001230",
"payerName": "Jon",
"expireTime": 1770134058
}Response
HTTP 200 — Success
| Field | Type | Required | Description |
|---|---|---|---|
status | integer | Yes | Status |
msg | string|null | Yes | Message |
data | object|null | Yes | Data |
data fields
| Field | Type | Required | Description |
|---|---|---|---|
applyTime | integer | Yes | Application time — Unix timestamp in seconds |
amount | number | Yes | Order amount — Order amount |
mchOrderNo | string | Yes | Merchant order number |
platOrderNo | string | Yes | Platform order number |
qrcode | string|null | Yes | Payment code — Merchants can generate a QR payment code from this value |
expireTime | integer|null | Yes | Expiration time — Unix timestamp in seconds |
Response example
json
{
"status": 200,
"msg": null,
"data": {
"mchOrderNo": "order_1662112944",
"platOrderNo": "P5nosqyWAQsQZNtYa5OW",
"applyTime": 1662112986,
"amount": 1200,
"qrcode": "00020101021226840023br.gov.bcb.pix2563qr.iugu.com/public/payload/v2/68A08B21C34E43B398137645AC2BF5E7520400015313986540520.005802BR5912AAAAABB LTDA6009SAO PAULO62070503***63046D60",
"expireTime": 1662199387
}
}