Square invoice paid notifications on your phone.

Get a push notification when a customer pays a Square invoice, in full or in part, with the amount, the customer and the invoice title.

invoice.payment_madePayments & billingPayments
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 Square

Add it as a webhook for invoice.payment_made.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the Square invoice.payment_made 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 the Square Developer Console (developer.squareup.com/apps), open your application (create a free one if you have none) and switch to Production.
  3. Under Webhooks, choose Subscriptions and click Add subscription.
  4. Paste your webhook URL as the notification URL, tick the invoice.payment_made event, and save.https://••••••••/•••••••• your personal URL, shown after install
  5. Tick **invoice.payment_made**. It fires for every payment on an invoice, so an invoice with a deposit and a balance gives two pushes: "partly paid", then "paid".
  6. An invoice payment is also a regular Square payment, so if you use the Payment received recipe too, you'll get a push from both.
  7. Sandbox deliveries are marked **(sandbox)**.
  8. Square signs every notification with an `x-square-hmacsha256-signature` header (an HMAC-SHA256 of your notification URL and the body, keyed with the subscription's signature key), but JustPush doesn't check that signature yet, so keep your endpoint URL private.
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// Square → invoice.payment_made
2// Fires each time a customer pays (part of) a Square invoice: a deposit, an instalment or
3// the balance.
4// Docs: https://developer.squareup.com/reference/square/invoices-api/webhooks/invoice.payment_made
5
6// Header names can arrive in any case.
7function header(request, name) {
8 const headers = request.headers || {}
9 const key = Object.keys(headers).find((k) => k.toLowerCase() === name)
10 const value = key ? headers[key] : null
11 return Array.isArray(value) ? value[0] : value
12}
13
14// Only link to real http(s) URLs.
15function link(url, cta) {
16 return typeof url === "string" && /^https?:\/\//.test(url) ? [{ cta, url }] : []
17}
18
19// Square Money is { amount, currency } with amount in the currency's smallest unit
20// (cents for USD/EUR/GBP, whole yen for JPY). Returns null when there's no amount.
21function money(value) {
22 const amount = value?.amount
23 const currency = value?.currency
24
25 if (typeof amount !== "number" || !Number.isFinite(amount) || typeof currency !== "string" || !currency) return null
26
27 try {
28 const format = new Intl.NumberFormat("en-GB", { style: "currency", currency })
29 return format.format(amount / 10 ** format.resolvedOptions().maximumFractionDigits)
30 } catch {
31 return null
32 }
33}
34
35// Adds up one Money field across the invoice's payment requests. Returns null when a
36// request is missing it or the currencies don't match, so we never show a wrong total.
37function sum(requests, field) {
38 if (!Array.isArray(requests) || requests.length === 0) return null
39
40 let amount = 0
41 let currency = null
42
43 for (const request of requests) {
44 const value = request?.[field]
45 if (typeof value?.amount !== "number" || typeof value.currency !== "string") return null
46 if (currency && value.currency !== currency) return null
47 currency = value.currency
48 amount += value.amount
49 }
50
51 return { amount, currency }
52}
53
54// "Amelia Earhart", else the company, else the email address.
55function customer(recipient) {
56 const name = [recipient?.given_name, recipient?.family_name].filter((part) => typeof part === "string" && part).join(" ")
57 return name || recipient?.company_name || recipient?.email_address || null
58}
59
60function handleRequest(request) {
61 const body = request.body && typeof request.body === "object" ? request.body : {}
62 const invoice = body.data?.object?.invoice
63
64 // Guard: only invoice.payment_made, so other invoice events on this integration stay quiet.
65 if (body.type !== "invoice.payment_made" || !invoice || typeof invoice !== "object") {
66 console.log(`Ignoring Square event "${typeof body.type === "string" ? body.type : "unknown"}"`)
67 return null
68 }
69
70 const paid = money(sum(invoice.payment_requests, "total_completed_amount_money"))
71 const total = money(sum(invoice.payment_requests, "computed_amount_money"))
72 const partly = invoice.status === "PARTIALLY_PAID"
73 const who = customer(invoice.primary_recipient)
74 const what = [invoice.title, invoice.invoice_number ? `(${invoice.invoice_number})` : null].filter(Boolean).join(" ")
75 const sandbox = String(header(request, "square-environment") ?? "").toLowerCase() === "sandbox" ? " (sandbox)" : ""
76
77 return {
78 title: partly ? "🧾 Invoice partly paid" : "🧾 Invoice paid",
79 message:
80 (partly && paid && total
81 ? `${paid} of ${total} paid` + (who ? ` by ${who}` : "")
82 : (paid ?? total ?? "An invoice payment") + (who ? ` from ${who}` : "")) +
83 (what ? ` — ${what}` : "") +
84 sandbox,
85 topic: "Square",
86 priority: 0, // Normal — money in is good news, not an emergency
87 sound: "cashregister",
88 buttons: link(invoice.public_url, "View invoice"),
89 }
90}
Payload

The Square invoice.payment_made webhook

This is what Square sends to your URL for invoice.payment_made. It is a sample, trimmed to the fields recipes use.

invoice.payment_made · sample.json
1{
2 "data": {
3 "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY",
4 "type": "invoice",
5 "object": {
6 "invoice": {
7 "id": "inv:0-ChCHu2mZEabLeeHahQnXDjZQECY",
8 "title": "Event Planning Services",
9 "status": "PAID",
10 "version": 3,
11 "order_id": "CAISENgvlJ6jLWAzERDzjyHVybY",
12 "timezone": "America/Los_Angeles",
13 "created_at": "2026-09-18T17:45:13Z",
14 "updated_at": "2026-09-18T18:23:11Z",
15 "description": "We appreciate your business!",
16 "location_id": "ES0RJRZYEC39A",
17 "invoice_number": "inv-100",
18 "delivery_method": "EMAIL",
19 "payment_requests": [
20 {
21 "uid": "2da7964f-f3d2-4f43-81e8-5aa220bf3355",
22 "due_date": "2026-10-24",
23 "request_type": "BALANCE",
24 "tipping_enabled": false,
25 "computed_amount_money": {
26 "amount": 10000,
27 "currency": "USD"
28 },
29 "automatic_payment_source": "NONE",
30 "total_completed_amount_money": {
31 "amount": 10000,
32 "currency": "USD"
33 }
34 }
35 ],
36 "primary_recipient": {
37 "given_name": "Amelia",
38 "customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4",
39 "family_name": "Earhart",
40 "email_address": "[email protected]"
41 },
42 "sale_or_service_date": "2026-09-24",
43 "accepted_payment_methods": {
44 "card": true,
45 "bank_account": false,
46 "cash_app_pay": false,
47 "square_gift_card": false,
48 "buy_now_pay_later": false
49 },
50 "store_payment_method_enabled": false
51 }
52 }
53 },
54 "type": "invoice.payment_made",
55 "event_id": "891e3589-462f-4215-9b61-f6df2d4432b7",
56 "created_at": "2026-09-18T18:23:11Z",
57 "location_id": "ES0RJRZYEC39A",
58 "merchant_id": "031FEV2Q6VMPK"
59}
FAQ

Square invoice paid 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 Square 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

Square on your phone in two minutes.

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