#gagan-suie_api

1 messages ¡ Page 1 of 1 (latest)

onyx meteorBOT
weary oysterBOT
#

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.

onyx meteorBOT
#

👋 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.

woven breach
#

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)

Learn to use webhooks to receive notifications of subscription activity.

balmy knoll
#

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?

woven breach
balmy knoll
#

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) })

woven breach
#

you can try running it and see if it works

balmy knoll
#

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.

woven breach
#

Do you want to display it to the customer, or it's just for your own reference?

balmy knoll
#

to the customer

woven breach
#

ah, no way to do so unfortunately

balmy knoll
#

gotcha