Shopify new order notifications on your phone.

Get a push notification with the customer, total and item count every time a new order is placed in your store, with a button to open the order.

orders/createE-commerceOrders Signature verified
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 Shopify

Add it as a webhook for Order creation.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the Shopify order creation 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 your Shopify admin, go to Settings > Notifications > Webhooks.
  3. Click Create webhook and pick the Order creation event.
  4. Paste your webhook URL as the URL, choose JSON and save.https://••••••••/•••••••• your personal URL, shown after install
  5. Copy the signing secret shown under the webhook list into JustPush.
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// Shopify → orders/create
2// Fires when a new order is placed in a Shopify store.
3// Docs: https://shopify.dev/docs/api/admin-rest/latest/resources/webhook
4//
5// Paste this into a JustPush Studio integration and point your Shopify
6// "Order creation" webhook at the integration's endpoint URL.
7
8// Header names can arrive in any case.
9function header(request, name) {
10 const headers = request.headers || {}
11 const key = Object.keys(headers).find((k) => k.toLowerCase() === name)
12 return key ? headers[key] : null
13}
14
15function handleRequest(request) {
16 const order = request.body
17
18 // Shopify names the event in a header; when it's there, it must be an order creation.
19 const topic = header(request, "x-shopify-topic")
20
21 if (topic && topic !== "orders/create") {
22 console.log(`Ignoring Shopify "${topic}" webhook`)
23 return null
24 }
25
26 // Ignore anything that isn't a well-formed order payload.
27 if (!order || !order.id || !Array.isArray(order.line_items) || (order.name == null && order.order_number == null)) {
28 console.log("Not a Shopify order payload — skipping")
29 return null
30 }
31
32 const currency = order.currency || "USD"
33 const total = order.total_price ?? "0.00"
34 const customer = order.customer
35 ? `${order.customer.first_name ?? ""} ${order.customer.last_name ?? ""}`.trim() || "Guest"
36 : "Guest"
37
38 const itemCount = Array.isArray(order.line_items)
39 ? order.line_items.reduce((sum, item) => sum + (item.quantity ?? 1), 0)
40 : 0
41
42 return {
43 title: `🛒 New order ${order.name ?? `#${order.order_number}`}`,
44 message: `${customer} spent ${total} ${currency} on ${itemCount} item(s)`,
45 topic: "Shopify Orders",
46 priority: 1, // High — a sale is worth surfacing promptly
47 sound: "cashregister",
48 buttons: order.order_status_url
49 ? [{ cta: "View order", url: order.order_status_url }]
50 : [],
51 }
52}
Payload

The Shopify orders/create webhook

This is what Shopify sends to your URL for order creation. It is a sample, trimmed to the fields recipes use.

orders/create · sample.json
1{
2 "id": 820982911946154500,
3 "name": "#1001",
4 "currency": "EUR",
5 "customer": {
6 "email": "[email protected]",
7 "last_name": "Doe",
8 "first_name": "Jane"
9 },
10 "line_items": [
11 {
12 "price": "12.00",
13 "title": "Enamel Pin",
14 "quantity": 2
15 },
16 {
17 "price": "25.00",
18 "title": "Sticker Pack",
19 "quantity": 1
20 }
21 ],
22 "total_price": "49.00",
23 "order_number": 1001,
24 "order_status_url": "https://your-store.myshopify.com/orders/abc123"
25}
Security

How the Shopify signature is verified

X-Shopify-Hmac-Sha256

Shopify signs every webhook with an HMAC-SHA256 hash of the request body, sent in the X-Shopify-Hmac-Sha256 header and made with your store's signing secret. Add the secret to the recipe in Studio and JustPush checks every request before your code runs, so requests that don't come from Shopify never reach your phone.

FAQ

Shopify new order 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 Shopify 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

Shopify on your phone in two minutes.

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