transaction.paid webhook so your backend can fulfill the order immediately.
How It Works
Create the PIX charge
Your server calls
POST /api/payment-gateway/process with "method": "PIX". CertoPay registers the charge and returns a QR Code URL and an EMV string.Display the QR Code or EMV code to the buyer
Render the image from
pix.qrCodeUrl and/or display pix.emv as a copy-paste field. Show the expiry time (pix.expiresAt) so the buyer knows how long they have to pay.Buyer pays via their banking app
The buyer scans the QR Code or pastes the EMV code. The payment settles instantly on the PIX network.
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
"PIX" to route the charge through the PIX payment rail.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.
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 PIX charges. Transitions to PAID once the buyer completes payment.Echoes back the payment method —
"PIX".The charge amount in centavos, as submitted.
The full EMV payload (Pix Copia e Cola). Display this in a text field with a copy button so the buyer can paste it into their banking app without scanning the QR Code.
URL to a PNG image of the QR Code. Render this with an
<img> tag in your checkout UI.ISO 8601 timestamp indicating when the PIX charge expires. After this time the QR Code and EMV code become invalid and a new charge must be created.
Displaying the Payment to the Buyer
Use both the QR Code and the copy-paste code so buyers can choose whichever is easier on their device:Confirming Payment
CertoPay sends atransaction.paid webhook event to your registered webhook URL when the PIX is settled:
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".