#Mr.Medi

1 messages ยท Page 1 of 1 (latest)

analog plinthBOT
hot star
#

๐Ÿ‘‹ happy to help

sharp cargo
#

I see, Im getting error 500 in that event

hot star
#

would you mind elaborating?

sharp cargo
#

Yes. For example, when I complete the checkout, the stripe webhook performs some events to my server. In the stripe cli I see 500 error like this

#

My goal is to know when the checkout is suceed in order to insert it in my local db

#

I guess should I do something like: if event['type'] == 'customer.subscription.created':
Create it in local db
return HttpResponse(status=200)

hot star
#

this means you're having a 500 error in your code

sharp cargo
#

thank you, it was an error due to webhook key

#

is there any doc where can i know in what sections of the body sent by stripe matches this data?customer_email, product, stripe_payment_intent

hot star
#

I'm not sure I understand the question, would you mind elaborating?

sharp cargo
#

I mean, I need that fields in order to insert it in my local db

#

But the event type checkout.session.completed sent by stripe, in the body of the request is a large json, is there any doc where can i find more easily that information?

hot star