stripe-paymentsstripe-payments-js

Given a Stripe payment intent ID, how can I find the checkout session ID?


For a successful payment, how can I find the related checkout session ID given the payment intent ID?


Solution

  • In that case you would just use the Checkout Session List API and pass in the Payment Intent ID for the payment_intent parameter. That will return an array with the related Checkout Session in it.