#ashish_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1422563569991684166
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there
Hey
So this is possible, but in a slighlty indirect way. First, you need to fetch the associated Checkout Session, which you can do with a List call, passing the PaymentIntent ID. When you add metadata to a Payment Link object, this actually gets passed to the Checkout Session, so you should be able to get the data you're looking for there
Ah okay, so it will appear under the checkout session object
Does the payment intent not return the checkout session object
Yep. An alternative approach for you may be just listen for the checkout.session.completed event, which will have this info more readily available
Okay, so what's the difference between that and payment_intent.success?
I'm trying to understand which is better for my use case
The checkout.session.completed generally contains a lot more information, so it's usually a lot more useful to listen to this, so this what we generally recommend. Some more useful info about this here: https://docs.stripe.com/checkout/fulfillment
Interesting. For now I have no subscriptions, but in the future if I were to implement a subscription, how would that flow go?