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

# Checkout Session Events

Afriex delivers a real-time notification to your configured webhook URL when a hosted **checkout session** is created.

<Note>
  Checkout sessions are currently available in the **sandbox/staging** environment only.
</Note>

## Security

See [Webhooks Introduction](/api-reference/endpoint/webhooks/introduction) for setup, signature validation, and retry behavior.

## Event Types

* `CHECKOUT_SESSION.CREATED` - A new hosted checkout session has been created

## Sample Payload

### Checkout Session Created

```json theme={null}
{
  "event": "CHECKOUT_SESSION.CREATED",
  "data": {
    "sessionId": "69528240ba52c13b669fb239",
    "merchantReference": "order-12345",
    "amount": 5000,
    "currency": "NGN",
    "expiresAt": "2025-12-29T13:45:10.123Z",
    "createdAt": "2025-12-29T13:30:22.554Z",
    "metadata": {},
    "customer": {
      "name": "John Doe",
      "email": "john.doe@example.com",
      "phone": "+2348192837465",
      "countryCode": "NG"
    }
  }
}
```

Once the session is paid, the payload also includes `afriexTransactionId` and `paidAt`. Subscribe to [Transaction Events](/api-reference/endpoint/webhooks/transaction-events) to track the resulting transaction through to settlement.

## Response

Return `200` (or another `2xx`) after successful validation and processing.
