RevenueCat billing issue notifications on your phone.

Get a High-priority push notification when a subscription renewal can't be charged, with the grace period if there is one.

BILLING_ISSUEFinanceSubscriptions
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 RevenueCat

Add it as a webhook for BILLING_ISSUE.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the RevenueCat billing_issue 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 RevenueCat dashboard, open your project's Integrations > Webhooks and add a new webhook.
  3. Paste your webhook URL as the webhook URL.https://••••••••/•••••••• your personal URL, shown after install
  4. Send all events, or only BILLING_ISSUE; the recipe ignores every other event type.
  5. Save, then click Send test event to confirm it arrives.
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// RevenueCat → BILLING_ISSUE
2// Fires when a renewal can't be charged.
3// Docs: https://www.revenuecat.com/docs/integrations/webhooks/event-types-and-fields
4//
5// Paste this into a JustPush Studio integration and add a RevenueCat webhook pointing
6// at the integration's endpoint URL.
7
8// Human-readable store names.
9const STORES = {
10 APP_STORE: "App Store",
11 MAC_APP_STORE: "Mac App Store",
12 PLAY_STORE: "Google Play",
13 AMAZON: "Amazon",
14 STRIPE: "Stripe",
15 PADDLE: "Paddle",
16 RC_BILLING: "Web Billing",
17 ROKU: "Roku",
18 PROMOTIONAL: "a promotional grant",
19 TEST_STORE: "Test Store",
20}
21
22// RevenueCat prices are decimals ("9.99"), not cents. Returns null when there's no price.
23function money(amount, currency) {
24 const value = Number(amount)
25
26 if (amount == null || !Number.isFinite(value) || !currency) return null
27
28 try {
29 return new Intl.NumberFormat("en-GB", { style: "currency", currency }).format(value)
30 } catch {
31 return `${value} ${currency}`
32 }
33}
34
35// Turn "NL" into 🇳🇱.
36function flag(countryCode) {
37 return /^[A-Z]{2}$/.test(countryCode ?? "")
38 ? String.fromCodePoint(...[...countryCode].map((c) => 127397 + c.charCodeAt(0)))
39 : ""
40}
41
42// "pro_monthly on App Store from [email protected] 🇳🇱 (sandbox)"
43function where(event) {
44 const attributes = event.subscriber_attributes ?? {}
45 const who = attributes.$email?.value ?? attributes.$displayName?.value
46 const store = STORES[event.store] ?? event.store
47
48 return (
49 (event.product_id ?? "a product") +
50 (store ? ` on ${store}` : "") +
51 (who ? ` from ${who}` : "") +
52 (flag(event.country_code) ? ` ${flag(event.country_code)}` : "") +
53 (event.environment === "SANDBOX" ? " (sandbox)" : "")
54 )
55}
56
57// RevenueCat timestamps are milliseconds since epoch.
58function day(ms) {
59 return new Date(ms).toLocaleDateString("en-GB", { day: "numeric", month: "short", timeZone: "UTC" })
60}
61
62function handleRequest(request) {
63 const event = (request.body || {}).event
64
65 // "Send test event" in RevenueCat; confirm the connection with a quiet push.
66 if (event?.type === "TEST") {
67 return { title: "🔔 RevenueCat connected", message: "Test event received", topic: "RevenueCat", priority: -1 }
68 }
69
70 // Guard: only handle this event type, so other RevenueCat events on this integration stay quiet.
71 if (event?.type !== "BILLING_ISSUE") {
72 console.log(`Ignoring RevenueCat event "${event?.type ?? "unknown"}"`)
73 return null
74 }
75
76 const grace = event.grace_period_expiration_at_ms
77 ? `. Grace period until ${day(event.grace_period_expiration_at_ms)}.`
78 : ""
79
80 return {
81 title: "⚠️ Billing issue",
82 message: `Couldn't charge ${where(event)}${grace}`,
83 topic: "RevenueCat",
84 priority: 1, // High — a paying customer is at risk of churning
85 }
86}
Payload

The RevenueCat BILLING_ISSUE webhook

This is what RevenueCat sends to your URL for billing_issue. It is a sample, trimmed to the fields recipes use.

BILLING_ISSUE · sample.json
1{
2 "event": {
3 "id": "CD489E0E-BILLING-",
4 "type": "BILLING_ISSUE",
5 "price": 0,
6 "store": "APP_STORE",
7 "app_id": "app1a2b3c4d5",
8 "aliases": [
9 "user_8Hq2"
10 ],
11 "currency": "EUR",
12 "product_id": "pro_monthly",
13 "app_user_id": "user_8Hq2",
14 "environment": "PRODUCTION",
15 "period_type": "NORMAL",
16 "country_code": "NL",
17 "transaction_id": "2000000712345678",
18 "entitlement_ids": [
19 "pro"
20 ],
21 "purchased_at_ms": 1790584200000,
22 "expiration_at_ms": 1793176200000,
23 "event_timestamp_ms": 1790584200000,
24 "subscriber_attributes": {
25 "$email": {
26 "value": "[email protected]",
27 "updated_at_ms": 1790584100000
28 }
29 },
30 "original_transaction_id": "2000000612345678",
31 "price_in_purchased_currency": 0,
32 "grace_period_expiration_at_ms": 1790929800000
33 },
34 "api_version": "1.0"
35}
FAQ

RevenueCat billing issue 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 RevenueCat 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

RevenueCat on your phone in two minutes.

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