#0xwess
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
this is all detailed here https://stripe.com/docs/payments/checkout/fulfill-orders
theres bunch of event types, which is responsible sepcifically to make sure the payment got thru?
checkout.session.completed or payment_intent.succeded or smth else?
it depends on what mode of checkout sessions you're doing (payment, subscription, setup) and what type of payment methods (sync/async) the customer pays
payment + card only
in that case checkout.session.completed is enough
what about apple pay or google pay? same?
yes
gotcha, thanks @rustic umbra
when testing webhooks locally, is it possible to populate the customer, product data etc? to make sure the body is 100% identical to the real life scenario?
i need to fetch customer data, product data etc in the webhook handler
how are you testing locally?
stripe cli
never mind, looks like it already populates it with fake data
at least the customer details
but not the product?
how to get which product was sold during that checkout?
to customize the fixtures you're triggering
to look at the line_items of a Checkout Session you can retrieve them using this API https://stripe.com/docs/api/checkout/sessions/line_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
or you can look at some of them here https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-line_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
thanks, another question:
its not possible to test it with my app unless its deployed on some hosted server, right?
no way to test the real app on localhost?
you mean test the webhook?