Server-to-server integrations that use PIX directly via the API can skip the session and create the transaction directly.
What the session contains
You define the charge when creating the session:
In response, Bob returns the
checkoutToken, the checkoutUrl, and — if you sent webhookUrl — the webhookSecret to verify signatures. The secret appears only in this response; store it.
Lifecycle
1
Created
The session is born with status
PENDING and a checkoutUrl ready for the buyer.2
In payment
The buyer chooses a method and completes the payment through the
checkoutUrl or the SDK.3
Completed or expired
On payment, the session generates a transaction and triggers the webhook. The session link lasts 24h by default (
expiresAt) — the PIX generated within it follows the expiration configured in the project.Session and transaction
The session is the resource that presents the payment to the buyer; the transaction is the record of what happened. A paid session results in a transaction with the final outcome (paid, expired, …).
Next steps
Create checkout session
All creation fields, with an interactive playground.
Hosted checkout
The complete end-to-end flow.
Transactions
The resource that records each payment attempt.
Check session status
Poll the session state as a complement to the webhook.