PayPal payment received notifications on your phone.

Get a push notification with the amount and what you keep after fees every time a PayPal payment is captured, including subscription payments.

PAYMENT.CAPTURE.COMPLETEDPayments & 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 PayPal

Add it as a webhook for PAYMENT.CAPTURE.COMPLETED.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the PayPal payment.capture.completed 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 PayPal Developer Dashboard, open Apps & Credentials, switch to Sandbox or Live, and open the REST app that takes your payments.
  3. Under Webhooks, click Add Webhook and paste your webhook URL as the Webhook URL.https://••••••••/•••••••• your personal URL, shown after install
  4. Tick the PAYMENT.CAPTURE.COMPLETED event and save.
  5. Tick **PAYMENT.CAPTURE.COMPLETED** (it may be listed as *Payment capture completed*). Taking **subscription payments**? Also tick **PAYMENT.SALE.COMPLETED**: PayPal Subscriptions report each payment as a sale, not a capture. This recipe handles both, and PayPal sends only one of them per payment.
  6. Webhooks belong to one REST app and one environment. Add the webhook to the app your checkout actually uses, in **Sandbox** or **Live** to match. Payments made through a different app don't reach this URL.
  7. Sandbox events are recognised from their API links and marked **(sandbox)**; add `?sandbox=1` to the URL to force that.
  8. To try it, send a mock event from the [Webhooks simulator](https://developer.paypal.com/dashboard/webhooksSimulator/). Mock events carry made-up data.
  9. PayPal signs every delivery (`PAYPAL-TRANSMISSION-SIG`, checked against a certificate and your webhook ID), 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// PayPal → PAYMENT.CAPTURE.COMPLETED (and PAYMENT.SALE.COMPLETED)
2// Fires when a payment capture completes (Orders v2 checkouts), or when a sale completes
3// (subscription payments and older v1 integrations).
4// Docs: https://developer.paypal.com/api/rest/webhooks/event-names/
5//
6// PayPal sends no event-type header, so the event is read from the body's event_type.
7
8// The events this recipe reacts to, and whether they carry a v2 capture or a v1 sale.
9const EVENTS = {
10 "PAYMENT.CAPTURE.COMPLETED": "capture",
11 "PAYMENT.SALE.COMPLETED": "sale",
12}
13
14// Look a key up without tripping over inherited names such as "toString".
15function pick(table, key, fallback = null) {
16 return typeof key === "string" && Object.prototype.hasOwnProperty.call(table, key) ? table[key] : fallback
17}
18
19// Only link to real http(s) URLs.
20function link(url, cta) {
21 return typeof url === "string" && /^https?:\/\//.test(url) ? [{ cta, url }] : []
22}
23
24// A non-empty string, or null.
25function text(value) {
26 return typeof value === "string" && value.trim() ? value.trim() : null
27}
28
29function flag(query, name) {
30 return ["1", "true", "yes"].includes(String(query?.[name] ?? "").toLowerCase())
31}
32
33// PayPal amounts are decimal strings, already in major units: v2 uses
34// { value: "10.00", currency_code: "USD" }, v1 uses { total: "10.00", currency: "USD" }.
35// Zero-decimal currencies such as JPY simply come without decimals ("500").
36function money(amount) {
37 const raw = amount?.value ?? amount?.total
38 const currency = amount?.currency_code ?? amount?.currency
39
40 // Don't invent a figure when the event doesn't carry one.
41 if ((typeof raw !== "string" && typeof raw !== "number") || raw === "" || typeof currency !== "string" || !currency) return null
42
43 const value = Number(raw)
44 if (!Number.isFinite(value)) return null
45
46 try {
47 return new Intl.NumberFormat("en-GB", { style: "currency", currency }).format(value)
48 } catch {
49 return `${raw} ${currency}`
50 }
51}
52
53// Events carry no sandbox flag, but their API links point at api(-m).sandbox.paypal.com.
54// ?sandbox=1 on the webhook URL forces it.
55function isSandbox(event, query) {
56 if (flag(query, "sandbox")) return true
57
58 const links = [event.links, event.resource?.links].filter(Array.isArray).flat()
59 return links.some((l) => typeof l?.href === "string" && /^https:\/\/api(-m)?\.sandbox\.paypal\.com\//.test(l.href))
60}
61
62function handleRequest(request) {
63 const event = request.body && typeof request.body === "object" ? request.body : {}
64 const kind = pick(EVENTS, event.event_type)
65 const payment = event.resource
66
67 // Guard: only completed captures and sales, so other PayPal events on this integration stay quiet.
68 if (!kind || !payment || typeof payment !== "object") {
69 console.log(`Ignoring PayPal "${typeof event.event_type === "string" ? event.event_type : "unknown"}" event`)
70 return null
71 }
72
73 const gross = money(payment.amount)
74 // v2 captures carry the fee breakdown; v1 sales may carry receivable_amount.
75 const net = money(payment.seller_receivable_breakdown?.net_amount)
76 const invoice = text(payment.invoice_id) ?? text(payment.invoice_number)
77 // A v1 sale with a billing agreement ID is a subscription payment.
78 const subscription = kind === "sale" && text(payment.billing_agreement_id)
79 const sandbox = isSandbox(event, request.query)
80 const web = sandbox ? "https://www.sandbox.paypal.com" : "https://www.paypal.com"
81
82 return {
83 title: "💰 Payment received" + (sandbox ? " (sandbox)" : ""),
84 message:
85 (gross ? `${gross} received` : "A payment was received") +
86 (net && net !== gross ? `, ${net} after fees` : "") +
87 (invoice ? ` · Invoice ${invoice}` : "") +
88 (subscription ? " · subscription payment" : ""),
89 topic: "PayPal",
90 priority: 0, // Normal: money in is good news, not an emergency
91 sound: "cashregister",
92 buttons: text(payment.id) ? link(`${web}/activity/payment/${encodeURIComponent(payment.id)}`, "View payment") : [],
93 }
94}
Payload

The PayPal PAYMENT.CAPTURE.COMPLETED webhook

This is what PayPal sends to your URL for payment.capture.completed. It is a sample, trimmed to the fields recipes use.

PAYMENT.CAPTURE.COMPLETED · sample.json
1{
2 "id": "WH-3F562076HD293871E-75F399086E414290U",
3 "links": [
4 {
5 "rel": "self",
6 "href": "https://api.paypal.com/v1/notifications/webhooks-events/WH-3F562076HD293871E-75F399086E414290U",
7 "method": "GET"
8 },
9 {
10 "rel": "resend",
11 "href": "https://api.paypal.com/v1/notifications/webhooks-events/WH-3F562076HD293871E-75F399086E414290U/resend",
12 "method": "POST"
13 }
14 ],
15 "summary": "Payment completed for $ 500.0 USD",
16 "resource": {
17 "id": "3Y662965014333303",
18 "links": [
19 {
20 "rel": "self",
21 "href": "https://api.paypal.com/v2/payments/captures/3Y662965014333303",
22 "method": "GET"
23 },
24 {
25 "rel": "refund",
26 "href": "https://api.paypal.com/v2/payments/captures/3Y662965014333303/refund",
27 "method": "POST"
28 },
29 {
30 "rel": "up",
31 "href": "https://api.paypal.com/v2/checkout/orders/9P99943869582473S",
32 "method": "GET"
33 }
34 ],
35 "payee": {
36 "merchant_id": "QDGTZ7B92B9QT",
37 "email_address": "[email protected]"
38 },
39 "amount": {
40 "value": "500.00",
41 "currency_code": "USD"
42 },
43 "status": "COMPLETED",
44 "invoice_id": "INV-2026-0042",
45 "create_time": "2026-09-28T09:30:00Z",
46 "update_time": "2026-09-28T09:30:00Z",
47 "final_capture": true,
48 "seller_protection": {
49 "status": "ELIGIBLE",
50 "dispute_categories": [
51 "ITEM_NOT_RECEIVED",
52 "UNAUTHORIZED_TRANSACTION"
53 ]
54 },
55 "supplementary_data": {
56 "related_ids": {
57 "order_id": "9P99943869582473S"
58 }
59 },
60 "seller_receivable_breakdown": {
61 "net_amount": {
62 "value": "474.56",
63 "currency_code": "USD"
64 },
65 "paypal_fee": {
66 "value": "25.44",
67 "currency_code": "USD"
68 },
69 "gross_amount": {
70 "value": "500.00",
71 "currency_code": "USD"
72 }
73 }
74 },
75 "event_type": "PAYMENT.CAPTURE.COMPLETED",
76 "create_time": "2026-09-28T09:30:04.355Z",
77 "event_version": "1.0",
78 "resource_type": "capture",
79 "resource_version": "2.0"
80}
FAQ

PayPal payment received 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 PayPal 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

PayPal on your phone in two minutes.

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