#samuele-purchase
1 messages · Page 1 of 1 (latest)
Hi there! No you won't automatically receive an email. The recommended route for provisioning a purchase is to use Webhooks.
Are you a developer?
Sure thing! First, what integration flow are you using?
Are you using Stripe Checkout or Elements?
I am using a library called use-shopping cart build on the stripe api and library
It still give a template for the webhook part for the api
Wait i'll send you the example with nextjs
The webhook folder
Yep, that is what I mentioned above.
And what you want to use for fulfillment
Our docs on this are here: https://stripe.com/docs/webhooks
So right inside there i can send an email to my self with node-mailer for example?
You could set up your handler to initiate an email each time you receive a certain Webhook event, yes.
I recommend reading through the docs above first to get a sense of how Webhooks work if you aren't familiar with them.
Yeah for sure
This is the response that i get from every webhook?
{ "id": "evt_2Zj5zzFU3a9abcZ1aYYYaaZ1", "object": "event", "api_version": "2020-08-27", "created": 1633887337, "data": { "object": {...} }
Yep pretty much. Connect Webhooks will contain a few other properties.
The object will depend on the Event type
The webhook runs for forever o for a month only and i have to reactivate it
Yeah, now i see
You have an endpoint on your server to receive Webhook events. We recommend that this is always running.