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

# Payload Format

> Reference for the standard storekit webhook payload structure, including JSON body format, HTTP headers, content type, and the metadata sent with every event.

All webhook payloads follow a consistent JSON structure.

## Standard Payload Structure

```json theme={null}
{
  "event": "order.created",
  "data": {
    // Event-specific data
  }
}
```

| Field   | Type   | Description                                       |
| ------- | ------ | ------------------------------------------------- |
| `event` | string | The event type identifier (e.g., `order.created`) |
| `data`  | object | The event payload containing relevant data        |

## HTTP Headers

Each webhook request includes the following headers:

| Header           | Description                                |
| ---------------- | ------------------------------------------ |
| `Content-Type`   | Always `application/json`                  |
| `svix-id`        | Unique identifier for this webhook message |
| `svix-timestamp` | Unix timestamp when the webhook was sent   |
| `svix-signature` | Signature for verifying authenticity       |

## Example: Order Created Payload

```json theme={null}
{
  "event": "order.created",
  "data": {
    "id": "ord_abc123",
    "code": "A1B2",
    "total": 2500,
    "tip": 250,
    "orderType": "Pickup",
    "asap": true,
    "createdAt": "2024-01-15T10:30:00Z",
    "customer": {
      "firstName": "John",
      "lastName": "Doe",
      "email": "john@example.com",
      "phone": "+44123456789"
    },
    "items": [
      {
        "name": "Margherita Pizza",
        "price": 1200,
        "quantity": 1,
        "modifiers": []
      }
    ],
    "venue": {
      "id": 1234,
      "name": "My Restaurant",
      "slug": "my-restaurant"
    }
  }
}
```

## Data Types

* **Monetary values**: All monetary values are in the smallest currency unit (e.g., pence for GBP, cents for USD)
* **Timestamps**: All timestamps are in ISO 8601 format (UTC)
* **IDs**: String identifiers for orders, alphanumeric codes for collection codes
