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

# Checkout Events

> Hosted and inline checkout session outcomes, each with a realistic sample payload.

Hosted and inline checkout session outcomes. These carry the `checkoutToken` and session `kind`, plus flat `amount`, `currency`, and `reference` fields. `checkout_completed` also expands the `customer` (and, for a subscription session, the `subscription`, `invoice`, and `plan`). The shared delivery envelope, headers, and inline-expansion rules are on the [webhooks overview](/webhooks/delivery) and the [event index](/api-reference/webhook-events); every sample below shows the full envelope.

<AccordionGroup>
  <Accordion title="checkout_completed" icon="cart-shopping">
    Fires when a hosted or inline checkout session settles. `kind` is `subscription`, `plan`, or `one_time`. For a subscription or plan session the `subscription` and paid `invoice` are expanded; a one-time session has no subscription.

    ```json theme={null}
    {
      "id": "evt_01hkbz5chkcmp00000000000000",
      "type": "checkout_completed",
      "createdAt": "2026-06-28T09:00:00.000Z",
      "data": {
        "checkoutToken": "chk_live_7Qm2x9Ab3Cd4Ef5Gh6Ij7Kl",
        "kind": "plan",
        "amount": 500000,
        "currency": "NGN",
        "reference": "DURO-CHK-8F3A21",
        "subscription": {
          "id": "sub_01hkbz3m4n5p6q7r8s9t0v1w2x",
          "status": "active",
          "customerId": "cus_01hkbz2a1b2c3d4e5f6g7h8j9k",
          "planId": "plan_01hkbz1z0y9x8w7v6u5t4s3r2q",
          "currentPeriodStart": "2026-06-28T09:00:00.000Z",
          "currentPeriodEnd": "2027-06-28T09:00:00.000Z",
          "trialEndsAt": null
        },
        "invoice": {
          "id": "inv_01hkbz4a5b6c7d8e9f0g1h2j3k",
          "amount": 500000,
          "currency": "NGN",
          "status": "paid",
          "periodStart": "2026-06-28T09:00:00.000Z",
          "periodEnd": "2027-06-28T09:00:00.000Z"
        },
        "customer": {
          "id": "cus_01hkbz2a1b2c3d4e5f6g7h8j9k",
          "email": "ada@example.com",
          "name": "Ada Lovelace",
          "phone": "+2348012345678"
        },
        "plan": {
          "id": "plan_01hkbz1z0y9x8w7v6u5t4s3r2q",
          "name": "Pro Annual",
          "amount": 500000,
          "currency": "NGN",
          "interval": "year",
          "intervalCount": 1
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="checkout_failed / checkout_cancelled" icon="cart-flatbed-suitcase">
    Fire when a checkout session fails at the gateway (`checkout_failed`) or the customer abandons it (`checkout_cancelled`). Both carry the same shape. The `customer` is expanded only if one already matched the session's email or phone. The example is `checkout_cancelled`.

    ```json theme={null}
    {
      "id": "evt_01hkbz5chkcxl00000000000000",
      "type": "checkout_cancelled",
      "createdAt": "2026-06-28T09:02:00.000Z",
      "data": {
        "checkoutToken": "chk_live_7Qm2x9Ab3Cd4Ef5Gh6Ij7Kl",
        "kind": "plan",
        "amount": 500000,
        "currency": "NGN",
        "reference": "DURO-CHK-8F3A21",
        "customer": {
          "id": "cus_01hkbz2a1b2c3d4e5f6g7h8j9k",
          "email": "ada@example.com",
          "name": "Ada Lovelace",
          "phone": "+2348012345678"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>
