Kit new purchase notifications on your phone.

Get a push notification with the total, buyer and products whenever a purchase is recorded in Kit.

purchase.purchase_createEmail marketingOrdersPayments
How it works

Three steps to your first push

STEP 01

Install the recipe

One click in Studio gives you a personal webhook URL.

STEP 02

Paste your URL into Kit

Add it as a webhook for Purchase created.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the Kit purchase created webhook

  1. Click Install in Studio and sign in. The recipe is added to your account and you get a personal webhook URL.
  2. In Kit, open app.kit.com/webhooks and create a webhook endpoint.
  3. Paste your webhook URL as the URL.https://••••••••/•••••••• your personal URL, shown after install
  4. Subscribe it to Purchase created only and save.
  5. Kit's webhooks page doesn't offer purchases yet (`subscriber.product_purchased` is still marked "planned"), so create a **legacy webhook** with one API call instead. Use your V4 API key from **Settings → Developer**:
  6. ```bash
  7. curl -X POST https://api.kit.com/v4/webhooks \
  8. -H "X-Kit-Api-Key: <your-api-key>" \
  9. -H "Content-Type: application/json" \
  10. -d '{ "target_url": "your webhook URL", "event": { "name": "purchase.purchase_create" } }'
  11. ```
  12. To stop it later, list your webhooks with `GET https://api.kit.com/v4/webhooks` and delete this one with `DELETE https://api.kit.com/v4/webhooks/<id>`.
  13. Legacy webhooks aren't signed or retried, so keep your endpoint URL private. They need a Kit plan with API access.
The code

What runs when the webhook arrives

Studio calls handleRequest(request) with the incoming webhook and sends the message it returns. It's yours after install; change anything.

transform.js
1// Kit → purchase.purchase_create (new purchase)
2// Fires when a purchase is recorded in Kit, for example by a connected store.
3// Docs: https://developers.kit.com/api-reference/v3/webhooks
4//
5// This event only exists as a legacy webhook (created through the API, see INSTALL.md).
6// Kit documents the purchase fields at the top level; the recipe also accepts them
7// wrapped in { purchase: { … } }, as the purchases API returns them.
8
9// Kit sends purchase amounts as decimals (21.0 means 21.00).
10function money(amount, currency) {
11 const value = typeof amount === "string" && amount.trim() ? Number(amount) : amount
12 // Don't invent a figure when the purchase doesn't carry one.
13 if (typeof value !== "number" || !Number.isFinite(value) || typeof currency !== "string" || !currency) return null
14 try {
15 return new Intl.NumberFormat("en-GB", { style: "currency", currency: currency.toUpperCase() }).format(value)
16 } catch {
17 return `${value} ${currency.toUpperCase()}`
18 }
19}
20
21// Kit sends plain strings; treat blanks as missing.
22function text(value) {
23 return typeof value === "string" && value.trim() ? value.trim() : null
24}
25
26function handleRequest(request) {
27 const body = request.body && typeof request.body === "object" ? request.body : {}
28 const purchase = body.purchase && typeof body.purchase === "object" ? body.purchase : body
29
30 // Guard: a purchase has a transaction ID and a product list; subscriber events don't.
31 if (!purchase.transaction_id || !Array.isArray(purchase.products) || body.events || body.subscriber) {
32 console.log("Not a Kit purchase — skipping")
33 return null
34 }
35
36 const total = money(purchase.total, purchase.currency)
37 if (!total) {
38 console.log("Kit purchase without a total or currency — skipping")
39 return null
40 }
41
42 // Name the first product and count the rest.
43 const products = purchase.products.filter((p) => p && typeof p === "object")
44 const first = products[0]
45 const qty = Number(first?.quantity)
46 const item = text(first?.name)
47 ? text(first.name) + (Number.isFinite(qty) && qty > 1 ? ` ×${qty}` : "")
48 : null
49 const what =
50 item && products.length > 1 ? `${item} and ${products.length - 1} more` : item ?? "something"
51 const who = text(purchase.email_address) ?? "Someone"
52
53 return {
54 title: `💰 New purchase: ${total}`,
55 message: `${who} bought ${what}`,
56 topic: "Kit",
57 priority: 0, // Normal — money in, worth a smile
58 sound: "cashregister",
59 }
60}
Payload

The Kit purchase.purchase_create webhook

This is what Kit sends to your URL for purchase created. It is a sample, trimmed to the fields recipes use.

purchase.purchase_create · sample.json
1{
2 "id": 8,
3 "tax": 2,
4 "total": 21,
5 "status": "paid",
6 "currency": "EUR",
7 "discount": 3,
8 "products": [
9 {
10 "sku": "7890-ijkl",
11 "name": "Sticker pack",
12 "quantity": 2,
13 "unit_price": 5
14 },
15 {
16 "sku": "mnop-1234",
17 "name": "Zine, issue 4",
18 "quantity": 1,
19 "unit_price": 10
20 }
21 ],
22 "shipping": 2,
23 "subtotal": 20,
24 "email_address": "[email protected]",
25 "transaction_id": "123-abcd-456-efgh",
26 "transaction_time": "2026-09-29T11:28:04Z"
27}
FAQ

Kit new purchase notifications: questions

Does this work on iPhone and Android?

Yes. Install the JustPush app from the App Store or Google Play and sign in. Every phone signed in to your account gets the notification.

Do I need to write code?

No. Install the recipe in Studio, paste your webhook URL into Kit and you are done. The code is there if you want to change the text, the sound or the buttons.

Can I change what the notification says?

Yes. After install the recipe's code is yours. Edit it in Studio and test it against the sample payload before you save.

What does it cost?

JustPush is free for 30 days. After that it's $19.99 a year, or $39.99 once. There is no extra charge for recipes.

Ready when you are

Kit on your phone in two minutes.

Install the recipe, paste one URL, done. Free for 30 days, no credit card required.