Skip to content

Create Payment / QR Code

Create a PIX payment order and obtain a QR Code payload.

Endpoint

POST /cashin/pix/create-qrcode

Authentication

Merchant Credential. See Authentication.

Request headers

NameInTypeRequiredDescriptionExample
Content-TypeheaderstringYesapplication/json
X-NonceheaderstringYesa9f3c1d47e8b9a2c4d1f9e8a7b6c5d4e
X-Merchant-IdheaderstringYes2492265300
X-TimestampheaderstringYes1638123456
DigestheaderstringYesSHA-256=Jr9cX0nM6yT7uF9GQ5G8ZC5M8vRZrQZP9+VbQ8Z8z0Q=
AuthorizationheaderstringYesSignature keyId="m123456",alg="ES256",headers="(request-target) x-timestamp x-nonce digest",signature="MEUCIQD8VxkzR7q5hF3k9dY0v6mKk7K0Nq9nYw+7Ck8LJr9mYAIgC5VQ7J0Z9YqL5F8Wc6E2Yw5qf1z8bYyYcR9kX8pY="

Request body

FieldTypeRequiredDescription
amountnumberYesOrder amount — Unit: Brazilian Real (BRL), up to 2 decimal places (min=10; max=50000)
mchOrderNostringYesMerchant order number — Merchant order number (maxLength=32; pattern=^[A-Za-z0-9|_|-]{1-32})
expireTimeintegerNoExpiration timestamp; defaults to 30 minutes
payerNamestringNoName
payerDocumentstringNoTax 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

FieldTypeRequiredDescription
statusintegerYesStatus
msgstring|nullYesMessage
dataobject|nullYesData

data fields

FieldTypeRequiredDescription
applyTimeintegerYesApplication time — Unix timestamp in seconds
amountnumberYesOrder amount — Order amount
mchOrderNostringYesMerchant order number
platOrderNostringYesPlatform order number
qrcodestring|nullYesPayment code — Merchants can generate a QR payment code from this value
expireTimeinteger|nullYesExpiration 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
  }
}