Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developer.pagou.ai/llms.txt

Use this file to discover all available pages before exploring further.

Use method: "voucher" when the customer will pay outside a card or Pix flow through a local payment instruction, bank-transfer reference, redirect, or payable document. voucher is the public Pagou method. The actual local payment option is selected from the company’s payment setup, currency, and country. Do not send provider-specific method names such as boleto, spei, mercadopago, webpay, or codi to the transactions API.

Regional meaning

Customer marketCommon local payment option behind voucherWhat the customer receives
Brazil, BRLBoletoBarcode, digitable line, due date, and boleto URL when available.
Mexico, MXNSPEI or local bank transferCLABE/account, reference, payment URL, or bank-transfer instructions.
Argentina, ARSLocal cash or wallet voucher, such as Mercado Pago when enabled for the companyReference, redirect URL, or local payment instructions.
Chile, CLPWebpay or local voucher optionRedirect/payment URL or payment instructions.
Colombia, COPPSE or local voucher optionRedirect/payment URL or payment instructions.
Peru, PENLocal voucher or bank-transfer optionReference, payment URL, or payment instructions.
Availability depends on the merchant configuration and the payment provider enabled for the company. If a country/currency is not enabled for that company, the transaction will be rejected during payment creation.

Create the transaction

Create a voucher payment with POST /v2/transactions.
{
  "external_ref": "order_3001",
  "amount": 125000,
  "currency": "MXN",
  "method": "voucher",
  "buyer": {
    "name": "Ada Lovelace",
    "email": "ada@example.com",
    "document": {
      "type": "CURP",
      "number": "LOLA800101MDFXXX09"
    },
    "address": {
      "street": "Av. Paseo de la Reforma",
      "city": "Ciudad de Mexico",
      "zipCode": "06600",
      "country": "MX"
    }
  },
  "products": [
    {
      "name": "Annual plan",
      "price": 125000,
      "quantity": 1
    }
  ],
  "notify_url": "https://example.com/webhooks/pagou"
}
amount and product price use the smallest unit of the selected currency. For BRL and MXN, send cents/centavos. For LATAM voucher payments, send buyer.document and buyer.address.country whenever possible. Some SPEI configurations can create the payment without a document, but most voucher/bank-transfer options validate the document type for the selected country. Do not include token. Card tokens are only valid for method: "credit_card".

Accepted document types

Use these values in buyer.document.type when the buyer is paying with method: "voucher". The country is read from buyer.address.country when present; otherwise Pagou can infer a primary country from currency.
CountryCountry codeAccepted document types
ArgentinaARDNI, CUIT
BoliviaBOCI, CE, NIT
BrazilBRCPF, CNPJ
ChileCLRUT, RUN
ColombiaCOCC, NIT
Costa RicaCRCDI
EcuadorECCI, PP, RUC, PAS
GuatemalaGTDPI, CUI, NIT
MexicoMXRFC, CURP
PanamaPACE
ParaguayPYCI, RUC
PeruPEDNI, RUC
UruguayUYCI, RUC
This table lists the document types accepted by the API validation layer. Payment availability for each country still depends on the company’s enabled payment setup.

Present the instructions

The transaction response exposes the normalized voucher object.
{
  "id": "tr_3001",
  "status": "pending",
  "method": "voucher",
  "amount": 125000,
  "currency": "MXN",
  "voucher": {
    "barcode": "646180123456789012",
    "digitable_line": "646180123456789012",
    "url": "https://provider.example/pay/order_3001",
    "expiration_date": "2026-05-12T23:59:59.000Z",
    "instructions": "Pay using the bank transfer reference before the expiration date.",
    "receipt_url": null
  }
}
FieldMeaning
voucher.barcodeBarcode, bank account, CLABE, payment code, or provider reference, depending on the local payment option.
voucher.digitable_lineDigitable line, bank-transfer reference, CLABE, or equivalent customer-copyable instruction.
voucher.urlPayment page, boleto URL, redirect URL, QR image URL, or provider-hosted voucher URL. Use it as the main call to action when present.
voucher.expiration_dateDue date or expiration date for the payment instruction.
voucher.instructionsAdditional bank, payment, or provider instructions.
voucher.receipt_urlReceipt URL when the provider returns one. It is usually available after payment confirmation.
Fields are nullable because each country and payment provider returns a different instruction format. Build your checkout to display every field that is present instead of requiring one fixed Boleto-only shape.

Delayed instruction updates

Some providers return all voucher data in the create response. Others return status: "pending" first and deliver the voucher fields through a webhook shortly after. Use this sequence:
  1. Create the transaction with method: "voucher".
  2. If voucher.url, voucher.digitable_line, or voucher.barcode is present, show it immediately.
  3. Subscribe to payment webhooks and update the customer-facing page when the same transaction receives voucher instructions.
  4. Reconcile with GET /v2/transactions/{id} if your worker missed a webhook or if the customer refreshes the checkout.
Redirect-based voucher options such as Webpay or CODI are still voucher payments. Treat their URL as the voucher payment action, not as a card 3DS challenge.

Relevant endpoints

EndpointUse
POST /v2/transactionsCreate the voucher transaction.
GET /v2/transactions/{id}Retrieve the latest status and voucher fields.
GET /v2/transactions?paymentMethods=voucherList voucher transactions for reconciliation or operations.
PUT /v2/transactions/{id}/refundRequest a refund after payment is confirmed, when the payment provider and selected payment option support refunds.
Payment webhooksReceive transaction.pending, transaction.paid, refund, expiration, and chargeback events.