#Jean-Philippe
1 messages · Page 1 of 1 (latest)
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.
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
I see, and what part are you having trouble with? what code have you written, which parts don't work as you expect?
I don't know how to retrieve this information, I thought I could with the metadata of a stripe checkcout session
yep that would work
in case of payment accept I have a return on a url_success but I would also like to retrieve additional information
you'd use your webhook handler for that, not the success_url
https://stripe.com/docs/payments/checkout/fulfill-orders for example. How much of this are you familiar with? how much of the code have you written and which specific things have you tried and where are you stuck?
$checkout_session = \Stripe\Checkout\Session::create([
'line_items' =>
[
$tab
],
'metadata' => [
'mdp_transaction'=> $password,
],
What can I use this metadata for then?
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?
Ok, I have to look at the webhooks, I don't know...
https://stripe.com/docs/payments/checkout/fulfill-orders would be the docs on that