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

# Formato del payload

> Riferimento per la struttura standard del payload webhook storekit, incluso il formato del corpo JSON, gli header HTTP, il content type e i metadati inviati con ogni evento.

Tutti i payload webhook seguono una struttura JSON coerente.

## Struttura standard del payload

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

| Campo   | Tipo   | Descrizione                                                  |
| ------- | ------ | ------------------------------------------------------------ |
| `event` | string | L'identificatore del tipo di evento (ad es. `order.created`) |
| `data`  | object | Il payload dell'evento contenente i dati rilevanti           |

## Header HTTP

Ogni richiesta webhook include i seguenti header:

| Header           | Descrizione                                                  |
| ---------------- | ------------------------------------------------------------ |
| `Content-Type`   | Sempre `application/json`                                    |
| `svix-id`        | Identificatore univoco di questo messaggio webhook           |
| `svix-timestamp` | Timestamp Unix del momento in cui il webhook è stato inviato |
| `svix-signature` | Firma per verificare l'autenticità                           |

## Esempio: payload di ordine creato

```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"
    }
  }
}
```

## Tipi di dati

* **Valori monetari**: Tutti i valori monetari sono espressi nell'unità minima della valuta (ad es. pence per GBP, cent per USD)
* **Timestamp**: Tutti i timestamp sono in formato ISO 8601 (UTC)
* **ID**: Identificatori stringa per gli ordini, codici alfanumerici per i codici di ritiro


## Related topics

- [Risoluzione dei problemi con i webhook](/docs/it/developers/webhooks/troubleshooting.md)
- [Trasformazioni](/docs/it/developers/webhooks/transformations.md)
- [Precompilazione del carrello tramite URL](/docs/it/developers/basket-prefill.md)
- [Trova e condividi l'URL del tuo store storekit](/docs/it/guides/store-settings/store-url.md)
- [Specifiche delle immagini](/docs/it/guides/store-settings/image-specifications.md)
