How It Works
Create the Boleto charge
Your server calls
POST /api/payment-gateway/process with "method": "BOLETO". CertoPay registers the charge and issues the banking slip immediately.Display the slip to the buyer
Show
boleto.digitableLine as a copy-paste field for internet banking entry, and link to boleto.pdfUrl so the buyer can download and print the physical slip. Always display the due date (boleto.dueDate).Buyer pays at a bank, Lotérica, or internet banking
The buyer can pay at any physical or digital channel that accepts Boleto. Payment is processed by the banking network and may take up to one business day to clear.
Request
Request Fields
The unique identifier for the order, obtained from
POST /api/orders. This links the payment transaction back to the originating order in your system.Must be
"BOLETO" to issue a banking slip.The charge amount in centavos. For example, R$ 297,00 →
29700. Must be a positive integer with no decimal places.The buyer’s CPF — exactly 11 numeric digits, no punctuation. Example:
"12345678900".The buyer’s mobile phone number, including the area code (DDD). Example:
"(11) 99999-9999".The buyer’s billing address. All sub-fields below are required and are printed on the Boleto slip.
Response
A successful request returns HTTP200 with the following body:
Response Fields
CertoPay’s unique identifier for this transaction. Store this to query the transaction status later with
GET /api/transactions/{id}.Initial status is always
PENDING for Boleto charges. Transitions to PAID once the banking network confirms payment.Echoes back the payment method —
"BOLETO".The charge amount in centavos, as submitted.
The human-readable barcode representation. This is typically displayed under the barcode image in the slip PDF.
The digitable line (linha digitável) — a numeric string the buyer types into their internet banking portal to pay without scanning a physical barcode. Display this with a copy button.
A URL to the Boleto PDF. Link to this so the buyer can download and print the slip, or share it via WhatsApp/email.
ISO 8601 timestamp for the payment deadline. Boletos cannot be paid after this date.
Displaying the Boleto to the Buyer
Give the buyer all three ways to access their slip:Always show
boleto.dueDate prominently. Buyers who miss the payment deadline cannot pay the expired slip — they must return to checkout so you can issue a new one. Consider sending an email reminder one day before expiry.Confirming Payment
One to three business days after the buyer pays, CertoPay sends atransaction.paid webhook event:
Always verify webhook events server-side. Before granting access or fulfilling an order, confirm the transaction status by calling:Only proceed when the response returns
"status": "PAID".