> ## 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.

# Checkout Events

> Receive abandoned carts from the hosted checkout and run your own recovery flow.

Checkout webhooks tell you when a buyer left the hosted checkout without paying, so your CRM or automation can follow up. Register a webhook with `type: "checkout"` to receive them.

## Example delivery payload

```json theme={null}
{
  "id": "9f2c4a3e8b1d4c6f9a0e7b2d5c8f1a3e6b9d2c5f8a1e4b7d0c3f6a9e2b5d8c1f",
  "event": "checkout",
  "api_version": "v2",
  "url": "https://crm.example.com/webhooks/pagou",
  "data": {
    "event_type": "checkout.abandoned",
    "id": "0b7c2c1e-1111-4a0e-9a49-9b0d1b2c3d4e",
    "abandoned_at": "2026-10-26T11:35:00.000Z",
    "customer": {
      "name": "Ana Souza",
      "email": "ana@example.com",
      "phone": "+5511999998888",
      "document": "12345678909"
    },
    "items": [
      { "title": "Online course", "quantity": 1, "unit_price": 9700 },
      { "title": "Bonus pack", "quantity": 2, "unit_price": 1990 }
    ],
    "amount": 13680,
    "currency": "BRL",
    "checkout_url": "https://pay.example.com/checkout/online-course?utm_source=pagou&utm_medium=webhook&utm_campaign=cart_recovery",
    "utm": {
      "source": "instagram",
      "medium": "social",
      "campaign": "black-friday",
      "content": null,
      "term": null
    },
    "abandonment_reason": "declined_credit_card"
  }
}
```

## Fields

| Field | Description |
| - | - |
| `data.id` | Checkout session id. Use it to deduplicate: each session produces at most one `checkout.abandoned`. |
| `data.abandoned_at` | When the session ended without payment (ISO 8601, UTC). |
| `data.customer` | What the buyer typed in the checkout. Any field the buyer did not fill is `null`; at least the email or the phone is present. |
| `data.items` | Cart lines with `unit_price` in the smallest currency unit (cents for BRL). |
| `data.amount` | Cart total in the smallest currency unit. |
| `data.checkout_url` | Link that reopens the same checkout, on your custom domain when one is active. It carries no buyer data or session token. |
| `data.utm` | UTM parameters the buyer arrived with. |
| `data.abandonment_reason` | `declined_credit_card` when the last attempt was a card declined by the issuer; `null` otherwise. |

## When it is sent

* About 30 minutes after the checkout session ends without payment. Sessions expire after 30 minutes of inactivity, so the event usually arrives about one hour after the buyer's last action.
* Only for buyers who left an email or a phone, who have not paid that checkout since, and who have no payment still pending (for example an unpaid Pix).
* Buyers in regions where your store asks for cookie consent are included only when they accepted it.
* At most once per checkout session. A purchase completed later still arrives as `transaction.paid`.

## Event names emitted today

* `checkout.abandoned`

## Handling guidance

* Deduplicate by `data.id`; redeliveries keep the same top-level `id`.
* Use `checkout_url` as the recovery link. Conversions through it are attributed to the abandoned cart in your dashboard metrics.
* Treat `customer` as personal data: store it only for the recovery flow and honor opt-out requests in your own CRM.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.