Paddle payment failed notifications on your phone.

Get a High-priority push notification when a Paddle payment attempt fails, with the decline reason and card.

transaction.payment_failedFinancePayments
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 Paddle

Add it as a webhook for transaction.payment_failed.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the Paddle transaction.payment_failed 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 Paddle, go to Developer tools > Notifications and click New destination.
  3. Choose Webhook as the type and paste your webhook URL as the URL.https://••••••••/•••••••• your personal URL, shown after install
  4. Select the transaction.payment_failed event and save the destination.
  5. The **View transaction** button opens the live Paddle dashboard. Paddle doesn't say in the event whether it came from sandbox or live, so if you're testing in sandbox, change `DASHBOARD` at the top of the code to `https://sandbox-vendors.paddle.com`.
  6. Paddle signs each webhook with a `Paddle-Signature` header, but JustPush doesn't verify it yet. 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// Paddle → transaction payment failed
2// Fires when a payment attempt fails.
3// Docs: https://developer.paddle.com/webhooks/overview
4//
5// Paste this into a JustPush Studio integration and add a Paddle notification destination
6// for the "transaction.payment_failed" event pointing at the integration's endpoint URL.
7
8// Paddle amounts are strings in the currency's smallest unit ("4900" = €49.00),
9// except for zero-decimal currencies such as JPY, where "500" means ¥500.
10const ZERO_DECIMAL = new Set(["jpy", "krw"])
11
12function money(amount, currency) {
13 const units = Number(amount)
14
15 // Don't invent a figure when the event doesn't carry one.
16 if (amount == null || amount === "" || !Number.isFinite(units) || !currency) return null
17
18 const code = String(currency).toLowerCase()
19 const value = ZERO_DECIMAL.has(code) ? units : units / 100
20
21 try {
22 return new Intl.NumberFormat("en-GB", { style: "currency", currency: code }).format(value)
23 } catch {
24 return `${value} ${code.toUpperCase()}`
25 }
26}
27
28// Paddle events don't say whether they came from sandbox or live, so set this yourself.
29// Sandbox: "https://sandbox-vendors.paddle.com"
30const DASHBOARD = "https://vendors.paddle.com"
31
32// Name what was bought, e.g. "AeroEdit Pro + 1 more".
33function purchased(transaction) {
34 const lines = transaction.details?.line_items ?? []
35 const first = lines[0]?.product?.name ?? transaction.items?.[0]?.price?.name
36
37 if (!first) return null
38
39 const count = Math.max(lines.length, transaction.items?.length ?? 0)
40 return count > 1 ? `${first} + ${count - 1} more` : first
41}
42
43function handleRequest(request) {
44 const event = request.body
45
46 // Guard: only handle this event type, so other Paddle events on this integration stay quiet.
47 if (!event?.data || event.event_type !== "transaction.payment_failed") {
48 console.log(`Ignoring Paddle event "${event?.event_type ?? "unknown"}"`)
49 return null
50 }
51
52 const transaction = event.data
53 const amount =
54 money(
55 transaction.details?.totals?.grand_total ?? transaction.details?.totals?.total,
56 transaction.currency_code
57 ) ?? "A payment"
58 const what = purchased(transaction)
59 // The failed attempt is the payment with an error code.
60 const failed = (transaction.payments ?? []).find((payment) => payment.error_code)
61 const reason = failed?.error_code?.replace(/_/g, " ")
62 const card = failed?.method_details?.card
63 const method = card?.last4 ? ` on ${card.type ?? "card"} ••${card.last4}` : ""
64
65 return {
66 title: "🚫 Payment failed",
67 message: amount + (what ? ` for ${what}` : "") + (reason ? ` — ${reason}${method}` : ""),
68 topic: "Paddle",
69 priority: 1, // High — a customer tried to pay and couldn't
70 buttons: [{ cta: "View transaction", url: `${DASHBOARD}/transactions-v2/${transaction.id}` }],
71 }
72}
Payload

The Paddle transaction.payment_failed webhook

This is what Paddle sends to your URL for transaction.payment_failed. It is a sample, trimmed to the fields recipes use.

transaction.payment_failed · sample.json
1{
2 "data": {
3 "id": "txn_01jfailed",
4 "items": [
5 {
6 "price": {
7 "id": "pri_01jmonthly",
8 "name": "Monthly",
9 "product_id": "pro_01jaeroedit",
10 "unit_price": {
11 "amount": "3000",
12 "currency_code": "EUR"
13 },
14 "description": "Monthly",
15 "billing_cycle": {
16 "interval": "month",
17 "frequency": 1
18 }
19 },
20 "quantity": 1
21 }
22 ],
23 "origin": "web",
24 "status": "ready",
25 "details": {
26 "totals": {
27 "fee": "182",
28 "tax": "630",
29 "total": "3630",
30 "discount": "0",
31 "earnings": "2818",
32 "subtotal": "3000",
33 "grand_total": "3630",
34 "currency_code": "EUR"
35 },
36 "line_items": [
37 {
38 "id": "txnitm_01jline",
39 "product": {
40 "id": "pro_01jaeroedit",
41 "name": "AeroEdit Pro",
42 "type": "standard",
43 "status": "active"
44 },
45 "price_id": "pri_01jmonthly",
46 "quantity": 1
47 }
48 ]
49 },
50 "payments": [
51 {
52 "amount": "3630",
53 "status": "error",
54 "created_at": "2026-09-28T09:29:58.000000Z",
55 "error_code": "declined",
56 "method_details": {
57 "card": {
58 "type": "visa",
59 "last4": "0002",
60 "expiry_year": 2028,
61 "expiry_month": 1
62 },
63 "type": "card"
64 }
65 }
66 ],
67 "customer_id": "ctm_01jjane",
68 "currency_code": "EUR"
69 },
70 "event_id": "evt_01jtransactionpaymentfa",
71 "event_type": "transaction.payment_failed",
72 "occurred_at": "2026-09-28T09:30:00.000000Z",
73 "notification_id": "ntf_01jtransactionpaymentfa"
74}
FAQ

Paddle payment failed 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 Paddle 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

Paddle on your phone in two minutes.

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