#trong.tran
1 messages · Page 1 of 1 (latest)
Sure, how can we help?
hi orakapo
I used it to create payment and used fulfill-orders to get the return result, but I have a question is there any way I can pass product info to payment api and get that product info at fulfill-orders Is that Okay?
When you fulfill the order, you have the checkout.session.completed webhook event, correct?
that right.
You can then call the Retrieve Checkout Session API and expanding its line_items.data.price.product
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
thank you, i will check it. please dont leave.
sorry, i not found line_items in event checkout.session.completed
that id :cs_test_a1t48FhtQ5nMnolz3OoTnhMlWyOorRTbwhtOhVX0OgnoDm5JxzCpUbcT1s
Yes you don't have it by default, but you would need to call the Retrieve Checkout Session API https://stripe.com/docs/api/checkout/sessions/retrieve using the Id you got from the event
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
sorry, when i call api retrieve a checkout session, i still not found line_items in response.
Have you expanded line_items.data.price.product?
I mean, when you call the Retrieve Checkout Session, you need to expand the line_items.data.price.product like the Doc above to be able to receive the result from the response
if you don't expand, you wouldn't see it
sorry, i will try it
Sorry I tried retrieving the data with curl above, but it still doesn't seem to get the data I've uploaded.
you would want to expand line_items.data.price.product not just line_items
thank you. i did it
but please dont leave
sorry when i complete the payment i get 4 events charge.succeeded,payment_intent.succeeded,payment_intent.created,checkout.session.completed so which event is the successful payment event?
What events do I need to rely on to notify the user that they have made a successful payment?
checkout.session.completed
thank you very much