/pix-automatico/qrcode/create Create Composite QR Code
Background
Generates a composite QR code for Pix automatic debit sign-up and returns the copy-and-paste code (copia e cola). The QR code can contain only the authorization, or also embed a first payment (an immediate payment, or a fixed-amount static code); see Choosing a Sign-up Method.
The payer scans the QR code with the bank app, or pastes the copy-and-paste code, and confirms the authorization details to complete sign-up. After the debit authorization is created, its status is CREATED.
QR codes with an embedded first payment (AUTHORIZATION_, STATIC_QRCODE) differ in two ways:
- The debit authorization is approved only after the embedded first payment is settled. Until the payment is settled successfully, the authorization stays
CREATED; do not treat "the QR code was generated" or "the payer scanned the code" as signed up. Wait untilstatusbecomesAPPROVEDbefore enabling the service and creating debit orders for subsequent periods. - Generating the QR code also creates a debit order whose
cashinTypeisQRCODE; its platform order number is returned indata.of the response and is used to track this payment; see First Payment.platOrderNo
Track changes in status through Get Authorization Details.
Endpoint
| Item | Value |
|---|---|
| Method | POST |
| Path | /pix-automatico/qrcode/create |
| Content-Type | application/json |
| Purpose | Generate a sign-up QR code, optionally collecting the first payment at the same time |
Authentication
Uses the common signature authentication (ES256 request signing). See Authentication and Request Signing.
Request Fields
For authentication headers, see Authentication; they are not listed in the table below.
| Field | Location | Type | Length | Required | Description |
|---|---|---|---|---|---|
mchOrderNo | Body | string | 64 | Yes | Merchant order number, newly generated by the merchant for each request, i.e. the merchant order number of this debit authorization. Unique under the same API and the same merchant, used for duplicate prevention; the original number is reused only when retrying the same request after a timeout or network failure, and a duplicate submission within the validity period returns the result of the first accepted request; see Idempotency. |
qrcodeType | Body | string | 64 | Yes | QR code type; see the enum below for values. |
payerDocument | Body | string | 64 | Yes | The payer's CPF (11 digits) or CNPJ (14 characters, may contain letters). |
payerName | Body | string | 140 | Yes | The payer's name or company name. |
frequency | Body | string | 16 | Yes | Payment frequency; see the enum below for values. |
startDate | Body | string | 10 | Yes | Authorization effective date, format YYYY-MM-DD (a date in the America/Sao_Paulo time zone); must be today or a future date. |
endDate | Body | string | 10 | No | Authorization end date, format YYYY-MM-DD (a date in the America/Sao_Paulo time zone); if omitted, the authorization is valid indefinitely; must not be earlier than startDate. |
amountType | Body | string | 16 | Yes | Amount type: FIXED (fixed amount, the debit amount is the same every period) or VARIABLE (variable amount, the debit amount may differ each period); see the enum below for values and Amount Rules for the rules. |
amountValue | Body | decimal | 25,2 | Yes | Amount value, two decimal places, must be greater than 0. When amountType is FIXED, it is the fixed debit amount per period; when VARIABLE, it is the expected single-period debit amount, for reference only, and the actual debit amount of each period may differ. |
contractNo | Body | string | 35 | Yes | Merchant-side contract number or subscription number. Visible to the payer when confirming the authorization in the bank app, used to identify which contract it is. |
contract | Body | string | 35 | No | Description of the authorization purpose, such as Mensalidade (monthly fee). Visible to the payer when confirming the authorization in the bank app, helping the payer recognize the service being debited. |
allowRetry | Body | boolean | N/A | No | Whether to allow a retry after a debit fails on the debit date; default true. When allowed, at most 3 retries per period, which must be completed within 7 calendar days after the original debit date; see Debit Retry. |
amount | Body | decimal | 25,2 | Conditional | First payment amount, two decimal places, must be greater than 0; omit it when qrcodeType is AUTHORIZATION_, required for the other types. Note that it is the amount of the first payment, not the per-period debit amount, which is set by amountType and amountValue. The two may be the same or different; they are not required to match. |
expireTime | Body | int | 19 | Conditional | Required when qrcodeType is AUTHORIZATION_. Expiration time of the immediate-payment QR code, Unix timestamp in seconds; cannot be a past time. |
qrcodeType QR Code Type Enum
| Value | Description |
|---|---|
AUTHORIZATION_ | Contains only the debit authorization configuration, with no payment; the payer scans and confirms to sign up, and the approval result is obtained by querying |
AUTHORIZATION_ | Additionally embeds an immediate payment; the payer completes the first payment and signs up with a single scan; the QR code expires at expireTime |
STATIC_QRCODE | Additionally embeds a fixed-amount payment and generates a static QR code: the QR code itself has no validity period and can be printed or displayed long-term; the debit authorization must still be approved before the response deadline (expiresAt) |
First Payment Fields by Type
In the table below, "—" means the field is not applicable to that type; passing it returns a validation failure.
| Field | AUTHORIZATION_ | AUTHORIZATION_ | STATIC_QRCODE |
|---|---|---|---|
amount | — | Required | Required |
expireTime | — | Required | — |
amountType Amount Type Enum
| Value | Description |
|---|---|
FIXED | Fixed amount: the debit amount is the same every period and equals amountValue |
VARIABLE | Variable amount: the debit amount may differ each period; amountValue is the expected single-period debit amount (reference value) |
frequency Payment Frequency Enum
| Value | Description |
|---|---|
WEEKLY | Weekly |
MONTHLY | Monthly |
QUARTERLY | Quarterly |
SEMIANNUAL | Semiannual |
ANNUAL | Annual |
Request Examples
Request header example:
POST /pix-automatico/qrcode/create HTTP/1.1
Content-Type: application/json
X-Merchant-Id: 2492265300
X-Timestamp: 1787011200
X-Nonce: a9f3c1d47e8b9a2c4d1f9e8a7b6c5d4e
Digest: SHA-256=<Base64 digest>
Authorization: Signature keyId="v1",alg="ES256",headers="(request-target) x-timestamp x-nonce digest",signature="<ES256_SIGNATURE_BASE64>"Request body example (AUTHORIZATION_):
{
"mchOrderNo": "AUTH20261009000001",
"qrcodeType": "AUTHORIZATION_QRCODE",
"payerDocument": "12345678901",
"payerName": "João Silva",
"frequency": "MONTHLY",
"startDate": "2026-11-01",
"amountType": "FIXED",
"amountValue": 150.00,
"contractNo": "CT-2026-0001",
"contractDescription": "Mensalidade",
"allowRetry": true
}Request body example (AUTHORIZATION_):
{
"mchOrderNo": "AUTH20261009000002",
"qrcodeType": "AUTHORIZATION_WITH_PAYMENT_QRCODE",
"payerDocument": "12345678901",
"payerName": "João Silva",
"frequency": "MONTHLY",
"startDate": "2026-11-01",
"amountType": "FIXED",
"amountValue": 150.00,
"contractNo": "CT-2026-0001",
"contractDescription": "Mensalidade",
"allowRetry": true,
"amount": 150.00,
"expireTime": 1792618200
}Request body example (STATIC_QRCODE):
{
"mchOrderNo": "AUTH20261009000003",
"qrcodeType": "STATIC_QRCODE",
"payerDocument": "12345678901",
"payerName": "João Silva",
"frequency": "MONTHLY",
"startDate": "2026-11-01",
"amountType": "FIXED",
"amountValue": 150.00,
"contractNo": "CT-2026-0001",
"contractDescription": "Mensalidade",
"allowRetry": true,
"amount": 150.00
}Response Fields
The API uses the standard status, msg, and data response structure.
| Field | Type | Length | Returned | Description |
|---|---|---|---|---|
status | int | 4 | Yes | Response code |
msg | string | 128 | Yes | Message corresponding to status |
data | object | N/A | On success | Composite QR code response data; may be omitted when the request fails at signature verification or protocol parsing. |
data. | string | 64 | Yes | Merchant order number, echoed from the request. |
data. | string | 64 | Yes | Debit authorization ID generated by the Adopay system, globally unique in the Adopay system. |
data. | string | 64 | Yes | The authorization number of this debit authorization in the Pix network (idRecorrencia), generated by the payee's payment service provider (PSP) under Central Bank of Brazil rules, one-to-one with authorizationId. Can be used for reconciliation with banks and the Pix network and for troubleshooting, and also for Get Authorization Details; just store it as-is. |
data. | string | 16 | Yes | Debit authorization status, initially CREATED; for all values see the Overview. |
data. | string | 64 | No | Platform order number of the first-payment debit order, used with Get Debit Order Details to track the payment result; null when qrcodeType is AUTHORIZATION_. |
data. | string | 64 | Yes | Identifier of the QR code. |
data. | string | 65535 | Yes | EMV payload of the composite QR code (copy-and-paste code). |
data. | string | 64 | Yes | Document identifier of this debit authorization. |
data. | string | 10 | Yes | Authorization effective date, format YYYY-MM-DD (a date in the America/Sao_Paulo time zone). |
data. | string | 10 | No | Authorization end date, format YYYY-MM-DD (a date in the America/Sao_Paulo time zone); null when valid indefinitely. |
data. | int | 19 | Yes | Creation time, Unix timestamp in seconds. |
Response Examples
Example 1: AUTHORIZATION_
{
"status": 200,
"msg": "sucesso",
"data": {
"mchOrderNo": "AUTH20261009000001",
"authorizationId": "0f8c1f3e-5b7a-4c0e-9a55-2d3b1a9c7e10",
"recurrenceId": "RR0435879820261001abc123def45",
"status": "CREATED",
"platOrderNo": null,
"qrcodeId": "7d2e5f4a-9b1c-4e8d-a3f6-2c5b8e1d9a07",
"qrcode": "00020126...",
"documentId": "doc-9f8e7d6c",
"startDate": "2026-11-01",
"endDate": null,
"createdAt": 1791581400
}
}Example 2: AUTHORIZATION_
{
"status": 200,
"msg": "sucesso",
"data": {
"mchOrderNo": "AUTH20261009000002",
"authorizationId": "5b2a9c1e-7d4f-4e83-b6a0-1c9d8e7f6a52",
"recurrenceId": "RR0435879820261009d4e5f6a7b8c",
"status": "CREATED",
"platOrderNo": "PAC202610090000000002",
"qrcodeId": "c3b8a1d2-6e4f-4a97-9d05-7f1e2c3b4a69",
"qrcode": "00020126...",
"documentId": "doc-3a2b1c0d",
"startDate": "2026-11-01",
"endDate": null,
"createdAt": 1791581400
}
}Response Error Codes
Back to Pix Subscription Overview