Skip to main content
This page is the shortest backend path from credentials to a working sandbox Pix payment.

Prerequisites

  • A sandbox token
  • Access to https://api.sandbox.pagou.ai
  • A stable order ID from your system to reuse as external_ref
  • An HTTPS webhook endpoint or a temporary local plan for reconciliation

Step 1: verify authentication

If this returns 200, your auth and network path are ready.

Step 2: create a Pix transaction

Example response

Step 3: persist identifiers

Store at least:
  • your external_ref
  • the Pagou transaction id
  • the current status
  • the requestId

Step 4: use webhooks for final state

Return 200 OK quickly and process asynchronously.

Step 5: reconcile when you are unsure

Common error

Status 409
Fix: reuse the same external_ref only for the same logical payment attempt. If the network outcome is unclear, reconcile before creating a new transaction.

TypeScript SDK equivalent

Next steps