# Orders

You can now connect your own webhook endpoint to receive real-time order data from your interactive catalogs. Just provide the URL of your webhook, and every time a customer submits an order inside one of your flipbooks, we’ll send the full order payload to your endpoint in JSON format.

**Returned codes:** when the webhook returns non **2xx** codes, we will consider it a failed request and log the error message. Failed requests are found in the Webhook section of the Integrations page.

<figure><img src="https://2559292467-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M8VdQGj8xJ1LHi7wX86%2Fuploads%2FMAUI9BPpKD4kHAxsn6h4%2FScreenshot%202025-11-17%20at%2011.13.57.png?alt=media&#x26;token=71fdd296-5385-484c-9c2b-fbe483585aac" alt=""><figcaption></figcaption></figure>

#### Restrictions

* Only HTTPS endpoints are allowed
* Max timeout: 10 seconds (typical)
* Retry up to 5 times with exponential backoff
* Disabled automatically after 5 failures
* Webhook URL cannot require authentication
* One webhook per workspace/account

#### Important attributes

Order JSON

<table><thead><tr><th width="225.56640625">Attribute</th><th width="168.453125">Type</th><th>Description</th></tr></thead><tbody><tr><td>type</td><td>String</td><td>The type of the event. Make sure you always check the value before processing data you received. For orders, the value should be "orders" (other values may be supported in the future).</td></tr><tr><td>order_id</td><td>String</td><td>The ID of the order as it is recorded in the Flipsnack back-end.</td></tr><tr><td>timestamp</td><td>Numeric</td><td>The timestamp value when the order was received.</td></tr><tr><td>datetime</td><td>Datetime</td><td>The UTC date and time the order was received by Flipsnack. </td></tr><tr><td>custom_fields</td><td>Object</td><td><p>A list of one or more custom fields required by the publisher for buyers to submit. Each field has a 'field_name' (string) and 'field_value' (string) property.<br>Example:</p><pre><code>{
    "field_name": "Full name",
    "field_value": "John Smith"
}
</code></pre></td></tr><tr><td>items</td><td>Array</td><td>The list of items specified in the order. Each item is a separate object containing information like SKU, name or price.</td></tr><tr><td>total_price</td><td>Number</td><td>The total value of the order (if items contain price information).</td></tr><tr><td>currency</td><td>String</td><td>The currency used for items in the order. If items in the order do not have a price, the currency will not be specified.</td></tr></tbody></table>

Item JSON

<table><thead><tr><th width="226.35546875">Attribute</th><th width="168.26953125">Type</th><th>Description</th></tr></thead><tbody><tr><td>sku</td><td>String</td><td>The SKU of the product, as specified in the product feed used by the catalog.</td></tr><tr><td>name</td><td>String</td><td>The name of the product. In case of product variations, it will contain the variations as well.</td></tr><tr><td>quantity</td><td>Number</td><td>The number of items ordered for a specific product.</td></tr><tr><td>discounted_price</td><td>Number</td><td>The discounted price of the product. If not specified, no discount was applied.</td></tr><tr><td>price</td><td>Number</td><td>The full price of the product. If not specified, the item does not have a price.</td></tr><tr><td>total</td><td>Number</td><td>The line item total (price × quantity). Calculated using discounted_price if available, otherwise price.</td></tr><tr><td>image</td><td>String</td><td>The URL of the product image.</td></tr></tbody></table>

Below is an example of the JSON structure sent for each order:

```json
{
    "type": "order",
    "order_id": "1234567",
    "timestamp": 1763108200,
    "datetime": "2025-11-14 08:16:40",
    "flipbook_hash": "tjsdsf9o7k",
    "flipbook_title": "Summer catalog",
    "custom_fields":
    [
        {
            "field_name": "Email address",
            "field_value": "john.smith@mycompany.com"
        },
        {
            "field_name": "Full name",
            "field_value": "John Smith"
        }
    ],
    "items":
    [
        {
            "sku": "P001",
            "name": "Scandinavian dining chair with light wood frame and soft fabric seat",
            "quantity": 3,
            "discounted_price": 232.99,
            "price": 327.99,
            "total": 698.97,
            "image": "image_url"
        },
        {
            "sku": "P003",
            "name": "Modern dining chair with sleek metal frame and fabric upholstery",
            "quantity": 1,
            "discounted_price": 242.99,
            "price": 283.99,
            "total": 242.99,
            "image": "image_url"
        },
        {
            "sku": "P010",
            "name": "Contemporary two-seater sofa with slim legs and plush cushions",
            "quantity": 1,
            "discounted_price": 112.99,
            "price": 139.99,
            "total": 112.99,
            "image": "image_url"
        },
        {
            "sku": "P002",
            "name": "Minimalist sectional sofa with low-profile, modular design",
            "quantity": 2,
            "discounted_price": 115.99,
            "price": 142.99,
            "total": 231.98,
            "image": "image_url"
        }
    ],
    "total": 1286.93,
    "currency": "USD"
}
```
