Stripe Secure Webhook

ADMIN
Secure your data sent from Stripe to Xano via webhook, following Stripe's recommended approach for manual verification described here:
If you are new to connecting Stripe to Xano, start with the Stripe Checkout template. Then, follow the instructions below to install this snippet.
Here's how to get started:
- Snippet:
- Video walk-through:
- Instructions: how to add a snippet
This snippet can be used with the example provided in our documentation on how to connect Stripe to Xano.
The snippet contains:
- POST /webhooks_test: an endpoint you can use in Stripe to confirm that the webhook is successfully firing on payment and sending its data to Xano.
- POST /webhooks_secure: an endpoint following Stripe's guideline on how to compare the signature provided in the header with a signature you create using the webhook's secret.
- Custom function /webhooks_secure_func: a custom function you can put at the start of an endpoint to verify the webhook signature is valid.
In this snippet you can learn:
- How to use Stripe webhooks
- How to use Request History to easily test results from a webhook
- How to use a table instead of Stop & Debug to check values in your function
- How to parse the http header of a webhook POST
- How to hash a value using HMAC
Comments
-
Really nicely put together explanation! This is a very helpful walk through and feature to have available for Stripe and other webhooks too!
-
That's great to hear @Brian Giometti ! I'm curious what other webhooks you'd use it with?
-
I'm currently doing the same signature verification for webhooks coming from https://cloudconvert.com/ which I'm finding to be a very powerful companion for working with docs in xano (details at the bottom of this page https://cloudconvert.com/api/v2/webhooks#webhooks-events)
-
Why is it that after installing the snippet it only shows 1 webhook.
-
Or rather, there is only one endpoint.
-
I'll check into this @prosperly - there should be three endpoints. Could you open a support ticket with us so I can check your specific install?
-
@prosperly can confirm there are three endpoints under the API group "stripe_checkout" on install.
-
This is what was generated for me. Am I missing something?
-
Ah - that's for the Stripe Checkout template.
Now, go to this snippet and install it: https://www.xano.com/snippet/hDn_vquP/
You can find step-by-step instructions for how to install a snippet here:
https://docs.xano.com/xano-features/snippets/preview-and-add-a-snippet
(Sorry it's not very intuitive, we plan to improve the workflow soon!)
Also feel free to join our office hours and I can walk you through it: https://go.xano.co/officehours
Categories
- 2.3K All Categories
- 44 📣 Announcements
- 35 🦾 Releases
- 23 👋 Welcome
- 613 🤷 Help! I'm a Noob
- 52 📱 No-Code Front-Ends
- 455 🌐 Working with APIs
- 298 🔢 Transforming data
- 105 🔌 Connect Xano to ...
- 19 🧑💻 Find an Expert
- 254 ❓Other questions
- 16 🔐 Security
- 18 ✂️ Snippets
- 14 🏆 Showcase
- 4 🗣️ Xano Chatter
- 50 📺 Video Tutorials
- 146 🙏 Request a feature
- 164 🐞 Report a Bug
- 16 🚀 Templates & Extensions