#rizvan_api
1 messages ¡ Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- rizvan_error, 1 hour ago, 57 messages
- rizvan_account-support, 22 hours ago, 15 messages
đ 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/1245347878898106471
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, let me help you with this.
What ID do you have? Of a Payment Link or Checkout Session?
Payment Link
The same Payment Link might be used to generate multiple Checkout Sessions/Subscriptions, do you want to get all of them?
Just the success payment link
What do you mean?
The subscription ID of the payment that was successful
I will send a payment link through the create payment link API to the customer. Then if the product is a subscription product I need to get the subscription id from the payment link that was successful
Do you generate a new Payment Link for each individual Customer?
Yes
That's not a correct approach, since Payment Links are designed to be reused, and generally for no-code solutions.
You should use Checkout Sessions instead, it's more flexible, this way it will be easier to get the successful Subscription ID: https://docs.stripe.com/payments/accept-a-payment?platform=web&ui=stripe-hosted
In your current case, you will first need to fetch all Checkout Sessions for the Payment Link: https://docs.stripe.com/api/checkout/sessions/list#list_checkout_sessions-payment_link
And then you will find the Subscription on the Checkout Session object: https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-subscription
However, I strongly recommend using Checkout Sessions directly, and not Payment Links.
Okay thank you
For payment link we cannot specify the mode?
payment or subscription
like what we do in checkout session
No, the mode is determined based on the selected Prices.
Okay