Skip to content

/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_WITH_PAYMENT_QRCODE, 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 until status becomes APPROVED before enabling the service and creating debit orders for subsequent periods.
  • Generating the QR code also creates a debit order whose cashinType is QRCODE; its platform order number is returned in data.platOrderNo of the response and is used to track this payment; see First Payment.

Track changes in status through Get Authorization Details.

Endpoint ​

ItemValue
MethodPOST
Path/pix-automatico/qrcode/create
Content-Typeapplication/json
PurposeGenerate a sign-up QR code, optionally collecting the first payment at the same time

Authentication ​

Uses the common signature authentication (ES256 request signing); set X-Merchant-Id to the partner's primary merchant ID. See Authentication and Request Signing.

Request Fields ​

For authentication headers, see Authentication; they are not listed in the table below.

FieldLocationTypeLengthRequiredDescription
subMerchantNoBodystring64YesSub-merchant ID.
mchOrderNoBodystring64YesMerchant order number, newly generated by the partner 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.
qrcodeTypeBodystring64YesQR code type; see the enum below for values.
payerDocumentBodystring64YesThe payer's CPF (11 digits) or CNPJ (14 characters, may contain letters).
payerNameBodystring140YesThe payer's name or company name.
frequencyBodystring16YesPayment frequency; see the enum below for values.
startDateBodystring10YesAuthorization effective date, format YYYY-MM-DD (a date in the America/Sao_Paulo time zone); must be today or a future date.
endDateBodystring10NoAuthorization 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.
amountTypeBodystring16YesAmount 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.
amountValueBodydecimal25,2YesAmount 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.
contractNoBodystring35YesMerchant-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.
contractDescriptionBodystring35NoDescription 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.
allowRetryBodybooleanN/ANoWhether 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.
amountBodydecimal25,2ConditionalFirst payment amount, two decimal places, must be greater than 0; omit it when qrcodeType is AUTHORIZATION_QRCODE, 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.
expireTimeBodyint19ConditionalRequired when qrcodeType is AUTHORIZATION_WITH_PAYMENT_QRCODE. Expiration time of the immediate-payment QR code, Unix timestamp in seconds; cannot be a past time.

qrcodeType QR Code Type Enum ​

ValueDescription
AUTHORIZATION_QRCODEContains 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_WITH_PAYMENT_QRCODEAdditionally embeds an immediate payment; the payer completes the first payment and signs up with a single scan; the QR code expires at expireTime
STATIC_QRCODEAdditionally 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.

FieldAUTHORIZATION_QRCODEAUTHORIZATION_WITH_PAYMENT_QRCODESTATIC_QRCODE
amount—RequiredRequired
expireTime—Required—

amountType Amount Type Enum ​

ValueDescription
FIXEDFixed amount: the debit amount is the same every period and equals amountValue
VARIABLEVariable amount: the debit amount may differ each period; amountValue is the expected single-period debit amount (reference value)

frequency Payment Frequency Enum ​

ValueDescription
WEEKLYWeekly
MONTHLYMonthly
QUARTERLYQuarterly
SEMIANNUALSemiannual
ANNUALAnnual

Request Examples ​

Request header example:

http
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_QRCODE):

json
{
  "subMerchantNo": "SUB00000001",
  "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_WITH_PAYMENT_QRCODE):

json
{
  "subMerchantNo": "SUB00000001",
  "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):

json
{
  "subMerchantNo": "SUB00000001",
  "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.

FieldTypeLengthReturnedDescription
statusint4YesResponse code
msgstring128YesMessage corresponding to status
dataobjectN/AOn successComposite QR code response data; may be omitted when the request fails at signature verification or protocol parsing.
data.subMerchantNostring64YesSub-merchant ID, identical to subMerchantNo in the request.
data.mchOrderNostring64YesMerchant order number, echoed from the request.
data.authorizationIdstring64YesDebit authorization ID generated by the Adopay system, globally unique in the Adopay system.
data.recurrenceIdstring64YesThe 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.statusstring16YesDebit authorization status, initially CREATED; for all values see the Overview.
data.platOrderNostring64NoPlatform order number of the first-payment debit order, used with Get Debit Order Details to track the payment result; null when qrcodeType is AUTHORIZATION_QRCODE.
data.qrcodeIdstring64YesIdentifier of the QR code.
data.qrcodestring65535YesEMV payload of the composite QR code (copy-and-paste code).
data.documentIdstring64YesDocument identifier of this debit authorization.
data.startDatestring10YesAuthorization effective date, format YYYY-MM-DD (a date in the America/Sao_Paulo time zone).
data.endDatestring10NoAuthorization end date, format YYYY-MM-DD (a date in the America/Sao_Paulo time zone); null when valid indefinitely.
data.createdAtint19YesCreation time, Unix timestamp in seconds.

Response Examples ​

Example 1: AUTHORIZATION_QRCODE

json
{
  "status": 200,
  "msg": "sucesso",
  "data": {
    "subMerchantNo": "SUB00000001",
    "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_WITH_PAYMENT_QRCODE

json
{
  "status": 200,
  "msg": "sucesso",
  "data": {
    "subMerchantNo": "SUB00000001",
    "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