> ## Documentation Index
> Fetch the complete documentation index at: https://developer.pagou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Payment Events

> Handle transaction webhooks for Pix, voucher, and card payments using the exact public payload shape Pagou delivers today.

Payment webhooks always use the transaction envelope. The top-level `event` stays `transaction`; the concrete event name is in `data.event_type`.

## Example delivery payload

```json theme={null}
{
  "id": "evt_pay_1001",
  "event": "transaction",
  "api_version": "v1",
  "data": {
    "id": "018f1f2e-7b44-7c9a-8d3e-1a2b3c4d5e71",
    "event_type": "transaction.pending",
    "correlation_id": "order_3001",
    "method": "voucher",
    "status": "pending",
    "amount": 125000,
    "currency": "MXN",
    "voucher": {
      "barcode": "646180123456789012",
      "digitable_line": "646180123456789012",
      "url": "https://payments.example/pay/order_3001",
      "expiration_date": "2026-05-12T23:59:59.000Z",
      "instructions": "Pay using the bank transfer reference before the expiration date.",
      "receipt_url": null
    },
    "informations": [
      { "key": "order_id", "value": "order_3001" },
      { "key": "channel", "value": "app" }
    ]
  }
}
```

`data.informations` echoes the custom `informations` array you sent when creating the transaction via the API — use it to reconcile the event against your own records. It is present only when you sent custom entries on create; transactions created without them (or through checkout links) omit the field.

## ACK response

```json theme={null}
{
  "received": true
}
```

## Event names emitted today

* `transaction.created`
* `transaction.pending`
* `transaction.paid`
* `transaction.cancelled`
* `transaction.refunded`
* `transaction.partially_refunded`
* `transaction.chargedback`
* `transaction.three_ds_required`

## Common ingestion error

```json theme={null}
{
  "error": "missing_event_id"
}
```

Fix: deduplicate by the top-level event `id`, not by transaction ID, because the same transaction can emit more than one business event over time.

## Mapping guidance

* Use `transaction.paid` to release goods or services.
* Keep the order open on `transaction.pending`.
* For `method: "voucher"`, `transaction.pending` can also carry payment instructions in `data.voucher`. Show the returned `url`, `digitable_line`, `barcode`, or `instructions` and keep waiting for `transaction.paid`.
* Use refund and chargeback events to drive finance and support flows.
* Route `transaction.three_ds_required` back into your card challenge flow.
