Stripe Secure Webhook
![brian](https://us.v-cdn.net/6037124/uploads/userpics/11OHPI6GVCSP/nPOPOEI090I2H.png)
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
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback