Skip to main content
Pagou currently exposes three public webhook families. Payment and subscription webhooks use an event envelope. Transfer webhooks use a payout type envelope.

Envelope comparison

DomainTop-level event fieldResource fieldConcrete event name
Paymentsevent: "transaction"datadata.event_type
Subscriptionsevent: "subscription"datadata.event_type
Transferstypedata.objecttop-level type

Payment webhook example

{
  "id": "evt_pay_1001",
  "event": "transaction",
  "api_version": "v1",
  "data": {
    "id": "tr_1001",
    "event_type": "transaction.paid",
    "correlation_id": "order_1001",
    "method": "pix",
    "status": "paid",
    "amount": 1500,
    "currency": "BRL"
  }
}

Transfer webhook example

{
  "id": "evt_payout_1001",
  "type": "payout.transferred",
  "api_version": "v2",
  "data": {
    "object": {
      "id": "po_1001",
      "status": "paid",
      "type": "pix",
      "amount": 1200
    }
  }
}

Subscription webhook example

{
  "api_version": "v2",
  "id": "120ebf7cc24835b5ea33ee617bf70cb91c3a4dcd7413afcb05f61c60d1c9de3d",
  "event": "subscription",
  "url": "https://merchant.example/webhooks/pagou",
  "data": {
    "id": "019e5d23-6ec8-73de-9c95-06093c62ba00",
    "event_type": "subscription.created",
    "status": "active",
    "amount": 500,
    "currency": "BRL",
    "latest_transaction": {
      "id": "019e5d23-6ed7-7121-a667-41e5ac929c72",
      "status": "paid"
    }
  }
}

ACK response

{
  "received": true
}

Common ingestion error

{
  "error": "missing_event_id"
}
Fix: require the top-level id, deduplicate by that value, return 200 OK quickly, and process asynchronously.

Mapping guidance

  • Drive business state from resource status, not from a frontend guess.
  • Route subscription lifecycle changes from data.event_type.
  • Map transfer event payout.transferred to settled resource status paid.
  • Reconcile if your worker crashes after acknowledgement.