#Ruchi Parekh

1 messages · Page 1 of 1 (latest)

inland eagleBOT
frail cliff
#

Hi there, do you have the checkout session ID?

frail cliff
#

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

lucid plover
frail cliff
#

Copy and paste your ID here

lucid plover
#

acct_1MiZR3GScJybqtiu

#

this one?

frail cliff
#

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

lucid plover
#

but in the response from payment intent, I am not getting the checkout session id

frail cliff
#

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?

lucid plover
#

So, do you want me to ask in another chat about how to access checkout session Id in the payment intent?

frail cliff
#

We can continue here, and I believe I have also answered this question earlier.

lucid plover
#

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

frail cliff
#

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

lucid plover
#

Hey Thanks Jack, I am able to do it.

#

Sorry to ask you so many questions.. but may I ask you 1 more question?

frail cliff
#

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.

lucid plover
#

Yes. I see that. I am just trying to see how I can make it more friendly to the user

frail cliff
lucid plover
#

Hey Jack.. Thanks for this. I really appreciate your help. You rock.

#

You can close this thread.