#gagan-suie_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.
- gagan-suie_api, 59 minutes ago, 14 messages
- gagan_checkout-subscription, 1 day ago, 8 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. Thank you for your patience!
âąď¸ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime! If this thread is closed and you have another question you'll need to start a new thread.
đ 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/1213002882606043156
đ Have more to share? You can add more detail below, including code, screenshots, videos, etc.
hello! i think the way you'll want to go about it is to listen for the invoice.paid event : https://stripe.com/docs/billing/subscriptions/webhooks#events and check. the billing_reason : https://stripe.com/docs/api/invoices/object#invoice_object-billing_reason if it's subscription_create.
Then update the cancel_at date of the Subscription (which you can find from https://docs.stripe.com/api/invoices/object#invoice_object-subscription)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
i have invoice.paid being used for other products (users can purchase premium subscription and we need to assign them premium tier on their accounts). so is there a way to check for this particular product subscription? maybe check the product name? if so, how do i get the product name?
you can find the product id in the corresponding line item : https://docs.stripe.com/api/invoices/object#invoice_object-lines-data-price-product of the Invoice if that works for you
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
is this how i can update the cancel_at property of a subscription?
await stripe.subscriptions.update(subscriptionId, { cancel_at: new Date().setMonth(new Date().getMonth() + numOfMonths) })
you can try running it and see if it works
ok i think i got it, is there a way to send some kind of personal data into the embedded view? id like to send the username in there.
Do you want to display it to the customer, or it's just for your own reference?
to the customer
ah, no way to do so unfortunately
gotcha