Stripe refund issued notifications on your phone.

Get a low-priority push notification when a Stripe charge is fully or partially refunded.

charge.refundedFinancePayments 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 Stripe

Add it as a webhook for charge.refunded.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the Stripe charge.refunded 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 Stripe Dashboard, open Workbench > Webhooks and click Add destination.
  3. Select the charge.refunded event and choose Webhook endpoint.
  4. Paste your webhook URL as the endpoint URL and save.https://••••••••/•••••••• your personal URL, shown after install
  5. Reveal the signing secret (whsec_…) and copy it 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// Stripe → charge.refunded
2// Fires when a charge is fully or partially refunded.
3// Docs: https://docs.stripe.com/api/events/types
4//
5// Paste this into a JustPush Studio integration and add a Stripe webhook destination
6// for the "charge.refunded" event pointing at the integration's endpoint URL.
7
8// Stripe amounts are in the currency's smallest unit (cents), except for
9// zero-decimal currencies such as JPY, where 500 means ¥500.
10const ZERO_DECIMAL = new Set([
11 "bif", "clp", "djf", "gnf", "jpy", "kmf", "krw", "mga",
12 "pyg", "rwf", "ugx", "vnd", "vuv", "xaf", "xof", "xpf",
13])
14
15function money(amount, currency) {
16 // Don't invent a figure when the event doesn't carry one.
17 if (typeof amount !== "number" || !Number.isFinite(amount) || !currency) return null
18
19 const code = String(currency).toLowerCase()
20 const value = ZERO_DECIMAL.has(code) ? amount : amount / 100
21
22 try {
23 return new Intl.NumberFormat("en-GB", { style: "currency", currency: code }).format(value)
24 } catch {
25 return `${value} ${code.toUpperCase()}`
26 }
27}
28
29// Test-mode objects live under /test in the Dashboard.
30function dashboardUrl(event, path) {
31 return `https://dashboard.stripe.com/${event.livemode ? "" : "test/"}${path}`
32}
33
34function handleRequest(request) {
35 const event = request.body
36
37 // Guard: only handle this event type, so other Stripe events on this integration stay quiet.
38 if (event?.object !== "event" || event.type !== "charge.refunded" || !event.data?.object) {
39 console.log(`Ignoring Stripe event "${event?.type ?? "unknown"}"`)
40 return null
41 }
42
43 const charge = event.data.object
44 const refunded = money(charge.amount_refunded, charge.currency)
45 const partial = charge.amount_refunded < charge.amount
46 const who = charge.billing_details?.email ?? charge.receipt_email
47
48 return {
49 title: "↩️ Refund issued",
50 message:
51 (refunded ? `${refunded} refunded` : "Refund issued") +
52 (partial && money(charge.amount, charge.currency) ? ` of ${money(charge.amount, charge.currency)}` : "") +
53 (who ? ` to ${who}` : ""),
54 topic: "Stripe",
55 priority: -1, // Low — you (or a teammate) most likely issued it yourself
56 buttons: [
57 {
58 cta: "View payment",
59 url: dashboardUrl(event, `payments/${charge.payment_intent ?? charge.id}`),
60 },
61 ],
62 }
63}
Payload

The Stripe charge.refunded webhook

This is what Stripe sends to your URL for charge.refunded. It is a sample, trimmed to the fields recipes use.

charge.refunded · sample.json
1{
2 "id": "evt_test_charge_refunded",
3 "data": {
4 "object": {
5 "id": "ch_test_3Qx1Y2",
6 "amount": 4900,
7 "object": "charge",
8 "currency": "eur",
9 "refunded": false,
10 "receipt_email": "[email protected]",
11 "payment_intent": "pi_test_3Qx1Y2",
12 "amount_refunded": 1500,
13 "billing_details": {
14 "name": "Jane Doe",
15 "email": "[email protected]"
16 }
17 }
18 },
19 "type": "charge.refunded",
20 "object": "event",
21 "created": 1790584200,
22 "livemode": false,
23 "api_version": "2025-09-30.clover"
24}
Security

How the Stripe signature is verified

Stripe-Signature

Stripe signs every webhook with a timestamped HMAC-SHA256 signature in the Stripe-Signature header, made with your endpoint'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 Stripe never reach your phone.

FAQ

Stripe refund issued 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 Stripe 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

Stripe on your phone in two minutes.

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