Payment Docs
Payments by countryLatin America

Brazil

PIX, card and boleto payments in BRL

Before you start

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

Overview

CurrencyCountry codePayment methods
BRLBRPIX (QR code) · Card · Boleto

Three integration options are available in Brazil. They require different payer details; which one is enabled for your account is determined by the terminal settings.

Not sure which option you have? Check with your manager.

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

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.1capital.capital/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

The payer is redirected to paymentLink and enters the card details on the payment page. The result is usually known right away; the final status arrives by webhook.

The payer's document, email and full address are passed in the customer object. The bank reviews a card payment against the payer's details and declines it without the address — even for digital goods. An order with missing fields, a document that fails the check-digit validation or a state not given as its two-letter code is rejected with 400.

Pass the payer's real address. A generic or someone else's address worsens the fraud checks. The phone is optional, but pass it too: some risk checks decline payers without one.

Customer object fields

FieldTypeRequiredDescription
documentstring✅ YesPayer's CPF (11 digits) or CNPJ (14 digits), with or without punctuation
emailstring✅ YesPayer's email
postcodestring✅ YesCEP: 8 digits, with or without the hyphen
streetstring✅ YesStreet
addressNumberstring✅ YesHouse number
neighborhoodstring✅ YesNeighborhood (bairro)
citystring✅ YesCity
statestring✅ YesState as the two-letter code (SP). The full name (São Paulo) is not accepted
addressComplementstring❌ NoApartment, suite, floor
phonestring❌ NoPhone with the area code (DDD): 10–11 digits, the 55 country code allowed. Recommended
documentTypestring❌ NoCPF or CNPJ. When passed, it must match document
firstNamestring❌ NoFirst name. Without the name, the one on the card is used
lastNamestring❌ NoLast name
ipstring❌ NoPayer's IP address. Recommended: it is used by the fraud checks

Request example

{
  "purpose": "Payment for order #1234",
  "amount": "150",
  "currency": "BRL",
  "externalId": "external_id",
  "externalUserId": "external_user_id",
  "successUrl": "https://example.com/success",
  "failUrl": "https://example.com/fail",
  "callbackUrl": "https://example.com/webhooks/payments",
  "isFeeOnUser": false,
  "customer": {
    "firstName": "Ana",
    "lastName": "Souza",
    "email": "ana.souza@example.com",
    "document": "12345678909",
    "phone": "11999998888",
    "postcode": "01310-100",
    "street": "Av. Paulista",
    "addressNumber": "1578",
    "addressComplement": "Apto 12",
    "neighborhood": "Bela Vista",
    "city": "São Paulo",
    "state": "SP"
  }
}

The payer is redirected to paymentLink. The payment page shows the boleto: its payment line (linha digitável) with a copy button, a link to the PDF, and the PIX of the same boleto as a faster alternative.

A boleto is registered with the bank in the payer's name, so the complete payer details are required in the customer object: a valid document, contacts and the full address. An order with missing or invalid fields is rejected with 400.

Pass the CPF or CNPJ of the actual payer. The document is validated by its check digits, and the boleto is registered in the name of the person it identifies.

Customer object fields

FieldTypeRequiredDescription
firstNamestring✅ YesFirst name
lastNamestring✅ YesLast name
documentstring✅ YesPayer's CPF (11 digits) or CNPJ (14 digits), with or without punctuation
emailstring✅ YesPayer's email
phonestring✅ YesPhone with the area code (DDD): 10–11 digits, the 55 country code allowed
postcodestring✅ YesCEP: 8 digits, with or without the hyphen
streetstring✅ YesStreet
addressNumberstring✅ YesHouse number
neighborhoodstring✅ YesNeighborhood (bairro)
citystring✅ YesCity
statestring✅ YesState: the two-letter code (SP) or the full name (São Paulo)
addressComplementstring❌ NoApartment, suite, floor
documentTypestring❌ NoCPF or CNPJ. When passed, it must match document

Request example

{
  "purpose": "Payment for order #1234",
  "amount": "150",
  "currency": "BRL",
  "externalId": "external_id",
  "externalUserId": "external_user_id",
  "successUrl": "https://example.com/success",
  "failUrl": "https://example.com/fail",
  "callbackUrl": "https://example.com/webhooks/payments",
  "isFeeOnUser": false,
  "customer": {
    "firstName": "Maria",
    "lastName": "Santos",
    "document": "12345678909",
    "email": "maria.santos@example.com",
    "phone": "11999998888",
    "postcode": "01310-100",
    "street": "Av. Paulista",
    "addressNumber": "1578",
    "addressComplement": "Apto 12",
    "neighborhood": "Bela Vista",
    "city": "São Paulo",
    "state": "SP"
  }
}

Due date and confirmation

  • The boleto is due 3 calendar days after it is issued, Brasília time. The order stays PENDING until the end of the due date and then becomes EXPIRED.
  • A paid boleto is confirmed by the bank within about one business day. A payment by the PIX of the boleto is confirmed in seconds.
  • Banks keep accepting a boleto for some time after its due date. When such a payment is confirmed, the expired order moves to COMPLETED and you receive a webhook.

Response

The response is a standard order object. The order is created with the CREATED status; redirect the payer to paymentLink to complete the payment.

Order object fields

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 (e.g. your refund is completed). 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