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

# Handle incoming ACP (Agentic Commerce Protocol) webhooks

> These come from ACP handlers when orders are placed via AI agents (ChatGPT, etc.)

These come from ACP handlers when orders are placed via AI agents (ChatGPT, etc.)

### Path parameters

<ParamField path="tenant_id" type="string" required>
  Tenant identifier
</ParamField>

### Request body

`object`

<ParamField body="type" type="string" required>
  Event type: 'order\_created' or 'order\_updated'
</ParamField>

<ParamField body="data" type="object" required />

### Response

`object`

<ResponseField name="received" type="boolean" required />

<ResponseField name="webhookId" type="string (uuid)" />

### Status codes

| Code  | Meaning                 |
| ----- | ----------------------- |
| `200` | Webhook received        |
| `401` | Unauthorized            |
| `404` | Tenant not found        |
| `422` | Invalid request payload |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.sync.stateset.com/v1/tenants/{tenant_id}/webhooks/acp/orders' \
    --header 'x-stateset-api-key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "type": "standard",
    "data": {
      "order_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "checkout_session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "permalink_url": "string",
      "status": "pending",
      "items": [
        {
          "id": null,
          "title": null,
          "quantity": null,
          "unit_price": null,
          "sku": null,
          "variant_id": null,
          "image_url": null
        }
      ],
      "totals": {
        "subtotal": {
          "amount": null,
          "currency": null
        },
        "tax": {
          "amount": null,
          "currency": null
        },
        "shipping": {
          "amount": null,
          "currency": null
        },
        "discount": {
          "amount": null,
          "currency": null
        },
        "grand_total": {
          "amount": null,
          "currency": null
        }
      },
      "customer": {
        "email": "ada.lovelace@example.com",
        "name": "Two-Person Tent",
        "phone": "+1 415 555 0142"
      },
      "shipping_address": {
        "line1": "548 Market St",
        "line2": "Suite 400",
        "city": "San Francisco",
        "state": "CA",
        "postal_code": "94107",
        "country": "US"
      },
      "refunds": [
        {
          "type": null,
          "amount": null
        }
      ],
      "created_at": "2026-08-31T14:22:05Z",
      "handler_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    }
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "received": true,
    "webhookId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  }
  ```
</ResponseExample>
