#trong.tran

1 messages · Page 1 of 1 (latest)

keen adderBOT
sweet edge
#

Sure, how can we help?

shrewd lava
#

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?

sweet edge
#

When you fulfill the order, you have the checkout.session.completed webhook event, correct?

shrewd lava
#

that right.

sweet edge
#

You can then call the Retrieve Checkout Session API and expanding its line_items.data.price.product

shrewd lava
#

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

sweet edge
shrewd lava
#

sorry, when i call api retrieve a checkout session, i still not found line_items in response.

sweet edge
#

Have you expanded line_items.data.price.product?

shrewd lava
#

I can't even find line_items in the results returned in the api.

sweet edge
#

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

shrewd lava
#

sorry, i will try it

sweet edge
#

you would want to expand line_items.data.price.product not just line_items

shrewd lava
#

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?

sweet edge
#

checkout.session.completed

shrewd lava
#

thank you very much