Stripe
Stripe sends each event you choose to a webhook endpoint. Point one at a Pocketbell webhook Source and a sale, a failed payment or a dispute arrives on your devices.
Each Source has one set of templates, so give each kind of event its own Source and its own Stripe destination.
New sales
Section titled “New sales”-
In the Pocketbell app, create a Source named Stripe sales, choose Webhook, set its Default Priority to Quiet, and copy its URL.
-
In the Stripe Dashboard, open Workbench → Webhooks, and click Create new destination.
-
Choose Events on your account, select
checkout.session.completed, and click Continue. Choose Webhook, paste the Source’s URL as the Endpoint URL, and click Create destination. -
Send a test event from the destination, or make a test payment. In the app, open the Source: it shows the event.
-
Set the templates, and save:
Template Value Title New saleMessage {{data.object.customer_details.email}}: {{data.object.amount_total}} {{data.object.currency}}
Disputes
Section titled “Disputes”The same steps, with a Source named Stripe disputes set to Important, a
destination for charge.dispute.created, and these templates:
| Template | Value |
|---|---|
| Title | Dispute opened |
| Message | {{data.object.amount}} {{data.object.currency}}: {{data.object.reason}} |
For other events, select them in a destination of their own, send a test, and pick fields from Insert Field in the app, which lists every field in the latest event.
How it behaves
Section titled “How it behaves”- Amounts are in the currency’s smallest unit, so $42.00 arrives as
4200 usd. - Without a message template, the message is a summary of the event’s top-level fields, such as its ID and type, not the payment. Set one for every Source.
- The Source’s URL is its secret. Stripe also signs each event, which Pocketbell doesn’t need to check; anyone without the URL can’t send to the Source.