Payment Docs
Payments by countryLatin America

Brazil

PIX payments by QR code in BRL

Before you start

This payment method is not enabled for all merchants. Check availability with your manager.

Overview

CurrencyPayment methodFlow
BRLPIX (QR code)You request a QR link and show it to the payer yourself

This is a host-to-host flow: you get the PIX QR link directly from the API and render it in your own interface.

Flow

Create an order

Create a regular order in BRL and save its id.

Create payment

POST /v1/orders/{orderId}/h2h/pix
curl -X POST "https://api.riopay.online/v1/orders/{orderId}/h2h/pix" \
  -H "Content-Type: application/json" \
  -H "X-Api-Token: YOUR_API_TOKEN"

The QR link is generated on the provider side. Set the request timeout to 30 seconds or more.

Response:

{
  "qrLink": "https://pix.com.br/..."
}

Show the QR code

Render qrLink as a QR code, or open it as a link on mobile devices. The payer confirms the transfer in their banking app.

Wait for the result

The order status changes to COMPLETED when the transfer is confirmed. You receive a webhook or can poll the order by ID.

Order status and webhooks

Order statuses

StatusFinalDescription
CREATEDNoOrder created, payment link not yet opened
PENDINGNoAwaiting payment
COMPLETEDYesPayment successful, funds received
FAILEDConditionallyPayment error
CANCELEDConditionallyOrder canceled by the system
EXPIREDConditionallyOrder expired before it was paid
BLOCKEDConditionallyTransaction blocked by the bank
REFUNDYesPayment refunded to the payer. Set after COMPLETED
CHARGEBACKYesPayment disputed by the payer and reversed by the bank. Set after COMPLETED

FAILED, CANCELED, EXPIRED and BLOCKED are not strictly final. If the bank confirms the payment later because of an error on its side, the order moves to COMPLETED and the webhook for this change is sent automatically. Be ready to receive COMPLETED for an order you have already marked as unsuccessful.

See also

On this page