#Jean-Philippe

1 messages · Page 1 of 1 (latest)

graceful smeltBOT
minor inlet
#

hi! what have you tried? generally you can just call the CheckoutSession retrieve API when handling the checkout.session.completed webhook event and the metadata you set will be on that returned object.

radiant raven
#

I would like to send a password when sending payment and retrieve this password when accepting payment, this would allow me to validate the payment in my database

minor inlet
#

I see, and what part are you having trouble with? what code have you written, which parts don't work as you expect?

radiant raven
#

I don't know how to retrieve this information, I thought I could with the metadata of a stripe checkcout session

minor inlet
#

yep that would work

radiant raven
#

in case of payment accept I have a return on a url_success but I would also like to retrieve additional information

minor inlet
#

you'd use your webhook handler for that, not the success_url

radiant raven
#

$checkout_session = \Stripe\Checkout\Session::create([
'line_items' =>
[
$tab
],
'metadata' => [
'mdp_transaction'=> $password,
],
What can I use this metadata for then?

minor inlet
#

What can I use this metadata for then?
You can just call the CheckoutSession retrieve API when handling the checkout.session.completed webhook event and the metadata you set will be on that returned object.

#

did you try that and see some part of it not working as you expected?

radiant raven
#

Ok, I have to look at the webhooks, I don't know...

minor inlet