Skip to main content
QR payins let you create a charge that a customer completes with their banking app. Use an idempotency key whenever a client may retry after a timeout or ambiguous network response.

Create a QR payin

Send method: "qr" to POST /v1/payins. The key is optional and can be sent in the JSON body or in the Idempotency-Key header.

QR expiration limits

expires_in is an integer number of seconds for platform QR payins. The server selects the configured rail; the integrator cannot select it. The legacy QR contract has an effective maximum of 86399 seconds (23:59:59). The 7-day QR rail has an effective maximum of 604800 seconds, with 86400 seconds (24 hours) as its default when the value is missing or non-positive. Values above the selected rail maximum are capped, not rejected. For the 7-day rail, use at least 120 seconds as an operational minimum. The response preserves the requested value as charge.requested_expires_in. If the selected rail returns a shorter lifetime, the response also includes ttl_notice with requested_expires_in, actual_expires_in, and a note. This is informational: use charge.expires_at as the deadline. Response 201:
Display qr_image or qr_image_url; use qr_payload only when it is present. Brazil returns the PNG image only, without a copy-and-paste payload. The numeric reference is the citable reference for support and sharing. When the customer pays, the account is credited automatically. Read the current status with GET /v1/payins/{payinID}.

Brazil: PIX QR in BRL or BOB

For Brazil, method: "qr" accepts either currency: "BRL" (recommended) or currency: "BOB" (direct advanced mode). With BRL, the platform quotes the BOB charge using the current mid rates, without spread in the quote, and passes the converted BOB amount to the core. The credit and fees are based on the BOB amount actually received. The quote is snapshotted and preserved on idempotent replay.
The response includes the QR image, the amount the payer must actually pay in BRL, the BOB amount charged, and the auditable platform quote:
conversion.amount is the source of truth for the amount shown to the payer. It is the exact amount the payer must transfer, and can differ materially from the typed amount because the rail applies its own rate. For example, an integrator may type 5.41 BRL while the generated QR requires 5.84 BRL. Never display the request amount instead of conversion.amount. When a rail returns a shorter lifetime than requested, the response is still successful and includes an additive notice:
For Brazil, request expires_in: 300 and show the fixed five-minute notice in your portal. The rail may return approximately five minutes even when a longer value was requested.

Advanced: enter the charge directly in BOB

For country: "BR", currency: "BOB" and method: "qr", the charge is denominated in BOB. The payer pays in BRL through the rail’s conversion. The payer’s CPF is required; payer_phone and payer_email are optional and are forwarded when provided:
The response is 201 with status: "pending", the QR image fields, the conversion shown to the payer, and the rail expiration. Brazil’s QR contract provides a PNG image, not an EMV copy-and-paste payload:
The checkout-link quote marks the BR/BOB and BR/BRL corridors with payer_required: true. When a payer opens a hosted link, the server-driven page asks for the CPF before materializing the charge. Do not bypass that form by creating a second charge. Checkout links quote both: BRL for payers (converted to BOB at materialization with the same mid rate and platform_quote snapshot as the direct payin) and direct BOB; with two currencies the materialize call sends ?currency=BRL (or BOB).

Read a QR payin

The detail endpoint returns the same sanitized charge needed to render the QR after a page reload. It includes the image, payer-facing conversion, expiry, status timestamps, and the optional ttl_notice; provider identity and internal fields are never exposed:
The list endpoint returns only charge.conversion and charge.expires_at for QR rows, never the image. Request it with explicit date filters:
When an internal QR in a checkout link has expired but still has an image, the checkout automatically re-materializes a fresh QR before serving it. The expired image is never presented as payable.
Use the public tracker as a payer-facing payment page for a pending QR payin. The flow is:
  1. Issue the link with the payin ID:
  1. Share the exact text Pay here: {track_url}. If your own portal renders a fallback, use pay.qr_image_url first, then pay.qr_payload as text. pay.qr_image is the inline base64 PNG option.
  2. The payer sees the public page with the QR, conversion.amount and conversion.currency when present, the optional rate, and expires_at. After payment, the page reflects the public status and timeline.
The link is a signed, no-login capability and is intentionally not listable. Do not put tracking codes in search indexes or expose them in a directory. Only a pending QR payin includes pay; other operations and terminal payins omit it. The link does not create another charge.

Confirmation and reconciliation

The lifecycle is webhook-first. An authenticated inbound event (the rail webhook uses its configured x-api-key header) can close the pending charge; a late reconciliation read is allowed only after the configured minimum age (15 minutes by default). Until the platform status is verified as credited, the charge remains pending and must not be credited: Subscribe to payin_credited and payin_charge_status_changed; use GET /v1/payins/{payinID} as the source of truth before fulfilling an order. Never retry a possibly submitted payment with a new idempotency key.

Brazil-specific errors

Idempotent retries

idempotency_key is optional for QR payins. Send it in the JSON body or as the Idempotency-Key header. If both are present, the body value is used. The platform namespaces the key by account internally; the integrator sends the key exactly as provided. The request identity includes country, currency, method and the numeric amount. For example, "100" and "100.00" are equivalent. description is display text and is not part of replay identity. The QR channel is not part of the replay identity: the same key replays the same charge regardless of channel. The first request creates one charge. A retry with the same key and equivalent payload returns the original object with idempotency_hit: true; it does not create another charge:
The header form is equivalent:
If the same key is reused with a different country, currency, method or amount, the API returns 409 idempotency_conflict:
A paid charge is replayed as-is. If the charge linked to the key is failed, expired or cancelled, the API returns 422 previous_attempt_failed with the generalized message request could not be processed; use the code, not the message. Rotate the idempotency key and submit the request again to receive a fresh QR. No replacement charge is created with the failed replay. Both the core and the platform return 400 invalid_idempotency_key when the integrator key is longer than 256 characters or contains carriage-return/ line-feed characters. The platform also rejects the request with the same code if its server-side account namespace would make the resulting core key exceed 256 characters. That namespace is invisible to the integrator: send the key unchanged.

Errors

FAQ

Yes. The description is display text and is not part of the replay identity.
Retry with the same idempotency key, then read the returned payin_id with GET /v1/payins/{payinID}. Do not create a new key for the same operation.
Only for Brazil (BR/BRL or BOB/qr). The rail validates that the CPF exists; a synthetic or unknown CPF can be rejected with CPF no encontrado. Other QR corridors keep their own payer requirements.
Use BRL when the amount your payer should pay is the product price. The platform converts it to BOB at the mid rate and snapshots the quote. Use BOB only when you need to specify the core charge directly.
conversion.amount is the exact payer-facing amount returned by the rail. The rail’s rate and rounding can make it differ from the amount typed in the request — an incident showed 5.41 BRL entered versus 5.84 BRL in the QR. Always display conversion.amount and never recalculate it in the client.
Some Brazil QR rails enforce an approximately five-minute lifetime and ignore longer requested durations. The API records your charge.requested_expires_in, returns the actual charge.expires_at, and adds ttl_notice when the difference is material. Request expires_in: 300 and start a new QR after expiry; do not reuse a dead QR.
GET /v1/payins includes a lightweight QR charge with only conversion and expires_at. Use GET /v1/payins/{id} when you need the image or the complete sanitized charge.
The API returns 503 rates_unavailable before creating a charge. Retry later with the same idempotency key; do not create a new payment attempt.
Only after the API status is credited or the corresponding verified webhook is received. A QR being generated, scanned or locally expired is not proof of settlement.
For the platform API, the maximum effective value is 604800 seconds (7 days) when the server selects the 7-day QR rail. The legacy QR rail has an effective maximum of 86399 seconds (23:59:59). Values above the selected maximum are capped, not rejected; the integrator does not choose the rail. Use at least 120 seconds for the 7-day rail.
The payer sees the QR image or its fallback payload, the exact conversion.amount and conversion.currency when returned, the optional rate, the expiry and the public status timeline. Provider identity and payer PII are not exposed.
Last modified on November 17, 2026