#Ruchi Parekh
1 messages · Page 1 of 1 (latest)
Hi there, do you have the checkout session ID?
This is a payment link URL, not checkout session.
Can you share with me your merchant ID? you can find it from the Stripe Dashboard -> Settings ->Account Details
Copy and paste your ID here
Yes thanks for the ID.
I did a check on the log, and I can see that the recent checkout session's payment was unsuccessful, and there's a payment_intent object associated with it. The checkout session ID is cs_test_a1FENgv8QS7wyz30MY06HKuNbd4YLdDWkaiS3tMmx9Qoeq0Cj6f9k4V8v4
but in the response from payment intent, I am not getting the checkout session id
No, the PaymentIntent doesn't have field for checkout session ID.
You original ask is about accessing the paymentIntent's metadata, and I believe this has been addressed already. do you have another question about paymentIntent and checkout session?
So, do you want me to ask in another chat about how to access checkout session Id in the payment intent?
We can continue here, and I believe I have also answered this question earlier.
ok that would be great
what I am trying to achibe is
when payment Intent is failed.. I want to access checkout session metadata to update information back to salesforce
I am using webhook and zapier to achieve the above
OK, you can listen to payment_intent.payment_failed event. This kind of event will be fired when a payment is failed. Then you call this API (https://stripe.com/docs/api/checkout/sessions/list?lang=node#list_checkout_sessions-payment_intent ) to get the checkout session that's associated with the failed paymentIntent, and get the metadata from this session object
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hey Thanks Jack, I am able to do it.
Sorry to ask you so many questions.. but may I ask you 1 more question?
Thanks for waiting, the checkout page will only redirect upon a successful payment.
If the payment fails, the checkout page will show an error message to your customer.
Yes. I see that. I am just trying to see how I can make it more friendly to the user
If you need more customization, https://stripe.com/docs/payments/payment-element you can build you own payment flow with PaymentElement