method field. This architecture means you ship one integration and support the full Brazilian payments landscape from day one.
Single Endpoint, Multiple Methods
All payment processing flows through one endpoint regardless of the payment method chosen:method field in the request body determines which payment rail is used. Everything else — authentication, idempotency, error handling — works identically across all three methods.
All monetary amounts must be expressed in centavos (smallest Brazilian currency unit). For example, R$ 297,00 is submitted as
29700. Never send decimal values.Authentication & Idempotency
Every request to/api/payment-gateway/process requires two headers:
| Header | Description |
|---|---|
X-Api-Key | Your secret API key. Keep this server-side — never expose it in client code. |
Idempotency-Key | A UUID v4 you generate per payment attempt. Re-sending the same key within 24 hours returns the original response without creating a duplicate charge. |
Payment Method Comparison
Use this table to decide which method best fits your checkout flow:| Method | Response time | Confirmation | Supports installments |
|---|---|---|---|
| PIX | Instant | Webhook transaction.paid | No |
| Boleto | Immediate (slip issued) | 1–3 business days via webhook | No |
| Credit Card | Immediate | CAPTURED status in response | Yes (up to 12×) |
- PIX is the best default for digital goods and time-sensitive orders. Funds are confirmed in seconds, 24 hours a day, 7 days a week.
- Boleto suits customers without a credit card or those who prefer offline payment. Expect a confirmation lag of one to three business days.
- Credit Card supports installments (
installmentsfield, up to 12×) and card tokenization for subscriptions and repeat customers.
Payment Lifecycle
Each payment method follows a distinct status progression. Understanding the lifecycle helps you decide when to grant access or fulfill an order.- PIX & Boleto
- Credit Card
PIX and Boleto share the same two-state lifecycle:
- The transaction is created with
status: PENDING. - When the buyer completes payment, CertoPay fires a
transaction.paidwebhook event. - Always verify the final state with
GET /api/transactions/{id}before fulfilling the order.
Choose a Payment Method
PIX
Instant payments via QR Code or copy-paste EMV code. Best for digital products and fast checkout flows.
Boleto
Banking slips payable at any bank, Lotérica, or internet banking. Confirmed within 1–3 business days.
Credit Card
Visa, Mastercard, and Elo with up to 12× installments. Supports tokenization for recurring billing.