Webhooks
Webhooks
On this page
A webhook is a message a store sends to an address you choose when something happens, for example when an order is placed or a product runs out of stock. Your software receives the message and reacts, so it does not have to keep asking the API. It works the same way for every GroKeeper store: each store has its own webhooks, its own signing secrets and its own address.
Set up a webhook#
- In the store's admin open Settings > API & webhooks > Webhooks and press Add webhook. A Super Admin does this. (Webhooks are made in the admin. There is no API call that creates one.)
- Give it a name, and the address that should receive the messages. The address must be a public internet address: private, internal and localhost addresses are refused when you save, and again every time a message is sent. A redirect to a different website is not followed.
- Choose the events you want (or tick all events, which also includes events added in later updates). Decide whether the messages may include customers' personal details.
- Copy the signing secret when it is shown. It is shown only once. You use it to check that messages really come from the store.
- Press Send test event on the endpoint to send a made-up sample message to your address.
The message#
Each message is a POST with a JSON body. The same event can be delivered more than once, so use id to ignore repeats.
{
"id": "evt_example0001",
"type": "order.paid",
"created": "2026-11-21T10:15:00Z",
"api_version": "2026-11-21",
"data": {
"id": 1024,
"number": "GK-261008-7WNM",
"status": "placed",
"payment_method": "cod",
"payment_status": "paid",
"subtotal": 1197,
"discount": 100,
"shipping": 60,
"total": 1217,
"coupon": "WELCOME10",
"customer": {
"name": "Sample Customer",
"email": "buyer@example.com",
"phone": "9000000000"
},
"address": {
"line1": "12 Sample Street",
"line2": null,
"city": "Sample City",
"state": "Sample State",
"pincode": "123456"
},
"courier": null,
"awb": null,
"items": [
{
"product_id": 7,
"name": "Sample Product",
"variant": "250 g",
"price": 399,
"qty": 3
}
],
"created_at": "2026-11-21T10:15:00+00:00",
"source": "website",
"tracking_url": null,
"cancel_reason": null,
"refund_status": "none",
"refunded_amount": 0,
"updated_at": "2026-11-21T10:15:00Z",
"gift": true,
"gift_message": "Happy celebrations! With best wishes.",
"packaging": {
"name": "Sample Packaging",
"fee": 60,
"gst_rate": 18
}
}
}| Field | Meaning |
|---|---|
id | Identifies the event. It is the same on every delivery and retry of that event. |
type | The event name, for example order.paid. See Events. |
created | When the event happened (ISO 8601, UTC). |
api_version | The version of this message format (currently 2026-11-21). |
data | The thing the event is about. It is the same object the API returns for that thing (for orders and products, the expand=full shape). |
test | Only present, with the value true, on a sample message sent with Send test event. The data of such a message is made up. |
Headers#
| Header | Meaning |
|---|---|
X-GroKeeper-Event | The event name, for example order.paid. |
X-GroKeeper-Topic | The event name again, for receivers that expect a "topic". |
X-GroKeeper-Delivery | The id of this delivery (it starts with dlv_). It stays the same across the retries of the same delivery. |
X-GroKeeper-Signature | t=<unix time>,v1=<hex>. While a secret is being rotated there are two v1= values; either may match. See Check the signature. |
User-Agent | GroKeeper-Webhooks/1.0 |
Content-Type | application/json |
Good to know
Older endpoints. An endpoint created before the 2026 API upgrade can use an older signature format; its page in the admin shows which format it uses. Rotating its secret moves it to the format described on these pages. Its order messages may also carry some older top-level fields next to the ones described here: ignore fields you do not know.
Personal details#
Each endpoint has a setting Include customers' personal details. With it switched off, email addresses and phone numbers are masked (for example b***@example.com), the street address lines of orders are left out (city, state and pincode stay), and the gift message of an order is always null. Contacts, reviewers and the customer of a return are masked in the same way. Switch it off for endpoints that do not need personal details.
No secret, key, payment reference or gateway id is ever included in a message.
Where to next#
- Events: the 20 events with a sample message each.
- Check the signature: working PHP, Node.js and Python code.
- Delivery, retries and the log: what to answer, and what happens when you do not.
- Good practice: handling repeats, testing and security.
- Integration recipes: a paid order to your accounting system, and a return event, step by step.