# The moment a payment lands.

> Get push alerts for every Stripe payment, failed charge, and subscription event. Add a webhook to Stripe or Paddle and track sales and churn on your phone.

<!-- source: https://pocketalert.app/use-cases/payment-alerts -->

Pocket Alert turns Stripe webhooks into push notifications on your phone. Every successful charge, failed payment, and cancellation lands in under a second, amount and customer included. Know about a failed payment before your customer emails you.

## Three steps to payment alerts

1. **Create the webhook** — Create a Pocket Alert webhook with a GJSON template mapping the Stripe payload, then copy its receive URL.
2. **Add a Stripe endpoint** — Paste the receive URL into Stripe as an endpoint and subscribe to charge.succeeded, charge.failed, and the events you want.
3. **See the sales** — Make a test payment. The charge lands on your phone with the amount and customer email.

## Your revenue in real time

Every sale, failed charge, and cancellation reaches your phone as soon as your processor fires the webhook.

- **Works with any processor** — Add your webhook URL as an endpoint in Stripe, PayPal, Paddle, or LemonSqueezy, then sales start coming through.
- **Amount & customer** — Map the amount, customer email, and event type so the push reads like an actual sale.
- **Pick your events** — Subscribe only to the events you want: successful charges, failed payments, and cancellations.
- **Catch failures & churn** — Create a webhook for charge.failed and one for customer.subscription.deleted, so dunning and churn each ring on their own channel.
- **Real-time revenue** — A cleared sale reaches you right away. No dashboard to refresh, no daily report to wait for.
- **Direct & secure** — Each webhook URL is scoped and stays secret over HTTPS, so you can point Stripe straight at it.

## Connect Stripe

### 1. Create a Pocket Alert webhook

Define a name and a GJSON `message` template that maps the Stripe payload fields. This returns your inbound receive URL.

```
curl -X POST 'https://api.pocketalert.app/v1/webhooks' \
  -H 'Token: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Stripe Payments","application_id":"qm47b9pzxzxg","message":"Payment %data.object.amount% %data.object.currency% from %data.object.billing_details.email%"}'
```

The response contains a slug, giving you the receive URL `https://p4a.me/wh/1234abcd`. You can also create it on the [Webhooks](https://pocketalert.app/webhooks) page.

### 2. Paste the receive URL into Stripe

In the Stripe Dashboard open Developers, then Webhooks, and click Add endpoint. Paste your Pocket Alert receive URL as the endpoint URL and subscribe to events such as `charge.succeeded`, `charge.failed`, and `customer.subscription.deleted`.

### 3. Map the fields

Stripe POSTs its event JSON to your receive URL. The template renders against it: `%data.object.amount%` (in the smallest currency unit, e.g. cents), `%data.object.currency%`, and `%data.object.billing_details.email%`. Use `%type%` to label the event. The [docs](https://info.pocketalert.app/api/webhooks/settings.html) cover GJSON paths in full.

## FAQ

### How do I get payment notifications?

Create a webhook in Pocket Alert with a message template, then paste its receive URL into Stripe as an endpoint. Each Stripe event (charge.succeeded, charge.failed, customer.subscription.deleted) renders against your template and lands as a push.

### Can I show the amount and customer?

Yes. Your GJSON template pulls fields straight from the Stripe payload — %data.object.amount% and %data.object.billing_details.email% — so the alert reads "New payment 4900 · alex@acme.com". Stripe amounts are in the smallest currency unit (cents).

### Can I pick which events to receive?

Subscribe your Stripe endpoint to the events you want, such as charge.succeeded, charge.failed, and customer.subscription.deleted. Only those POST to your receive URL and reach your phone.

### Which payment providers are supported?

Stripe, PayPal, Paddle, LemonSqueezy, Chargebee, and any processor that sends webhooks will work. Point its endpoint at your Pocket Alert receive URL and map its payload fields in the template.

### Can I separate failed payments from sales?

Yes. Create one Pocket Alert webhook per event type — one for charge.failed, one for customer.subscription.deleted — and give each its own application so dunning and churn ring on a channel you can tell apart.

### Can failed payments ring louder than routine sales?

Set a default level per webhook: keep routine sales at default, give the charge.failed webhook level high so it cuts through Focus on iPhone, and send churn events silent if you only want them on record. A critical level even breaks through Do Not Disturb on Android — useful when a failed payment means a production account just lost service.
