#samuele-purchase

1 messages · Page 1 of 1 (latest)

turbid walrus
#

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?

glad parcel
#

Yes i am

#

Can you send some docs about it please?

turbid walrus
#

Sure thing! First, what integration flow are you using?

#

Are you using Stripe Checkout or Elements?

glad parcel
#

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

turbid walrus
#

Yep, that is what I mentioned above.

#

And what you want to use for fulfillment

glad parcel
#

So right inside there i can send an email to my self with node-mailer for example?

turbid walrus
#

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.

glad parcel
#

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": {...} }

turbid walrus
#

Yep pretty much. Connect Webhooks will contain a few other properties.

glad parcel
#

can i see even if the payment was incompleted?

#

Oh last question

turbid walrus
#

The object will depend on the Event type

glad parcel
#

The webhook runs for forever o for a month only and i have to reactivate it

glad parcel
turbid walrus
#

You have an endpoint on your server to receive Webhook events. We recommend that this is always running.

glad parcel
#

Oh okok

#

Thanks!