'Stripe API - get success url using paymentIntentID

Through Stripe API - is there a way to retrieve the original checkout_session using paymentIntentId (e.g. pi_XYZABC2423) or chargeId (e.g. ch_3QOXYZABCD)?

I specifically need success url (or cancel url), which I believe are parts of the checkout session

Thanks.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source