# ocapi-shop Webhooks API

**Canonical:** https://apis.io/apis/ocapi-shop/ocapi-shop-webhooks-api/  
**Provider:** ocapi-shop — https://apis.io/providers/ocapi-shop/  
**Base URL:** https://dashboard.ocapi.shop  
**Documentation:** https://dashboard.ocapi.shop/docs

ocapi-shop Webhooks API is one of 16 APIs that [ocapi-shop](https://apis.io/providers/ocapi-shop/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. Tagged areas include Webhook. The published artifact set on APIs.io includes an OpenAPI specification.

Webhooks push the store's events to a URL of yours as they happen, instead of you polling for them. Owners only. A store has up to 10 endpoints (IDs `whk_`), each listening for some of these events: | Event | When | | --- | --- | | `order.created` | An order is placed or recorded | | `order.updated` | An order's `order_status`, `payment_status` or tracking changes | | `order.paid` | An order's payment becomes `paid` (it also sends `order.updated` when it changes) | | `product.created`, `product.updated`, `product.deleted` | A product is created, edited (reordering doesn't count) or deleted | Creating an endpoint subscribes it and deleting it unsubscribes it, which is how Zapier's REST hooks work. Each event is a `POST` with a JSON body: ```json { "id": "evt_...", "type": "order.created", "created_at": "2026-01-01T12:00:00.000Z", "store_id": "str_...", "data": { ...the order, exactly as Get an order returns it } } ``` `data` is the resource as this API returns it (an Order or a Product; a deleted product as it was). The `webhooks` section of this spec documents each event. Requests also carry the headers `Ocapi-Event-Id`, `Ocapi-Event-Type` and `Ocapi-Delivery-Id`. ## Verifying signatures Every request has an `Ocapi-Signature` header like `t=1767268800,v1=5257a869...`: 1. Split it on `,` and take `t` (a Unix timestamp) and `v1` (a hex digest). 2. Compute HMAC-SHA256 of `<t>.<raw request body>`, keyed with the endpoint's `secret` (`whsec_...`), as lowercase hex. 3. Compare it with `v1` in constant time, and reject a `t` more than 5 minutes from now so an old request can't be replayed. ```ruby t, v1 = header.split(",").map { it.split("=", 2) }.to_h.values_at("t", "v1") expected = OpenSSL::HMAC.hexdigest("SHA256", secret, "#{t}.#{raw_body}") valid = ActiveSupport::SecurityUtils.secure_compare(expected, v1) && (Time.now.to_i - t.to_i).abs <= 300 ``` Use the raw body as received; parsing and re-serializing the JSON changes it. ## Delivery and retries Answer with any 2xx status within 10 seconds. Anything else (an error, a timeout, a redirect) is retried with growing waits (1 minute, 5 minutes, 25 minutes, then hours) for up to 8 attempts over about 12 hours. Events can arrive more than once or out of order: use the event `id` to skip duplicates and the resource's `updated_at` to keep the newest. After 15 failed attempts in a row Ocapi turns the endpoint off (`active: false`, with `disabled_at`) and emails the store's owner; turn it back on with Update a webhook. URLs must be HTTPS and reach a public address.

## Operations (8)

| Method | Path | Summary |
|---|---|---|
| GET | `/api/v1/stores/{store_id}/webhooks` | List webhooks |
| POST | `/api/v1/stores/{store_id}/webhooks` | Create a webhook |
| GET | `/api/v1/stores/{store_id}/webhooks/{webhook_id}` | Get a webhook |
| PATCH | `/api/v1/stores/{store_id}/webhooks/{webhook_id}` | Update a webhook |
| DELETE | `/api/v1/stores/{store_id}/webhooks/{webhook_id}` | Delete a webhook |
| GET | `/api/v1/stores/{store_id}/webhooks/{webhook_id}/deliveries` | List webhook deliveries |
| POST | `/api/v1/stores/{store_id}/webhooks/{webhook_id}/test` | Send a test event |
| POST | `/api/v1/stores/{store_id}/webhooks/{webhook_id}/secret` | Rotate a webhook's secret |

## Machine-readable artifacts (1)

- **OpenAPI** — https://artifacts.apis.io/ocapi-shop/openapi/ocapi-shop-webhooks-api-openapi.yml

## Other ocapi-shop APIs (12)

- [ocapi-shop Account API](https://apis.io/apis/ocapi-shop/ocapi-shop-account-api/)
- [ocapi-shop Categories API](https://apis.io/apis/ocapi-shop/ocapi-shop-categories-api/)
- [ocapi-shop Discounts API](https://apis.io/apis/ocapi-shop/ocapi-shop-discounts-api/)
- [ocapi-shop Domains API](https://apis.io/apis/ocapi-shop/ocapi-shop-domains-api/)
- [ocapi-shop Drivers API](https://apis.io/apis/ocapi-shop/ocapi-shop-drivers-api/)
- [ocapi-shop Images API](https://apis.io/apis/ocapi-shop/ocapi-shop-images-api/)
- [ocapi-shop Insights API](https://apis.io/apis/ocapi-shop/ocapi-shop-insights-api/)
- [ocapi-shop Orders API](https://apis.io/apis/ocapi-shop/ocapi-shop-orders-api/)
- [ocapi-shop Partners API](https://apis.io/apis/ocapi-shop/ocapi-shop-partners-api/)
- [ocapi-shop Products API](https://apis.io/apis/ocapi-shop/ocapi-shop-products-api/)
- [ocapi-shop Settings API](https://apis.io/apis/ocapi-shop/ocapi-shop-settings-api/)
- [ocapi-shop Storefront API](https://apis.io/apis/ocapi-shop/ocapi-shop-storefront-api/)

## Tags

Webhook

## Use this from code or an agent

- **REST, no key:** `GET https://apis.io/api/v1/providers/ocapi-shop` returns the provider's full profile as JSON.
- **MCP:** `https://apis.io/mcp` (Streamable HTTP) — search the catalog, read any provider, compare providers, check agent readiness.
- **Free API key** for catalog-wide search, ratings and comparisons: sign in with GitHub, Google or LinkedIn at https://apis.io/developer/account/ (plans: https://apis.io/developer/plans/).

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/ocapi-shop/ocapi-shop-webhooks-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/ocapi-shop/.
