QR code payments

Create transfers directly from QR codes without creating a recipient or quote.

Create a payment by providing a QR code directly when you create a transfer.

Availability

QR-code payments are currently available for BRL. Support for COP, PEN, and ARS is planned.

Prerequisites

  1. Store an API key that can create transfers for the account.
  2. Collect the QR-code value from the payee.
  3. Confirm that the QR code is for the desired currency.

Create a payment from a QR code

  1. Create the transfer with an inline quote object. Set kind to instant and provide its source and destination.
  2. Pass the QR-code value in recipient instead of passing a recipient_id. Do not create a recipient first.
  3. Store the returned transfer ID and use it to monitor the payment.

Use the Create transfer endpoint with a request body shaped like this:

{
  "quote": {
    "kind": "instant",
    "source": {
      "rail": "..."
    },
    "destination": "..."
  },
  "recipient": "0002133...."
}

The recipient value is the QR-code value. The inline instant quote replaces creating a quote before you create the transfer.

How amounts work

If the QR code includes an amount, Due uses the amount encoded in the QR code for the payment. Treat that amount as the payment amount when you present the payment to your user.

If the QR code does not include an amount, provide the amount required by the QR-code transfer request once the API reference is available.

What changes from the standard transfer flow

Standard transfer flowQR-code payment flow
Create a recipient before creating the transfer.Pass the QR-code value in recipient.
Create a quote before creating the transfer.Include an inline quote object with kind: "instant".
Provide destination account details separately.The QR code supplies the recipient destination details.

Troubleshooting

The QR-code payment is unavailable

Confirm that the QR code is for a BRL payment. BRL is currently the only supported QR-code payment currency. COP, PEN, and ARS are not yet available.

The payment amount differs from the amount you expected

Inspect the QR code before you submit the transfer. When it contains an amount, Due uses that encoded amount.

You are using a recipient or quote from an existing flow

Remove the recipient-creation and quote-creation steps. Pass the QR-code value in recipient and include the instant quote object directly in the transfer request.


Did this page help you?