#vienklett_best-practices
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/1288236989275045908
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
I'd recommend checking these docs: https://docs.stripe.com/billing/subscriptions/change
example: I have this subcription: sub_1PgA4HH5ocKrGenqn7PCSW47 which has Staging Linq Pro Plus - price_1OrORyH5ocKrGenqsZr1D6m0. Now i want to remove Staging Linq Pro Plus - price_1OrORyH5ocKrGenqsZr1D6m0 from subscription and add Linq One - price_1Q0UkcH5ocKrGenqGrYE9p4S
i need to do it through my code
Yeah the doc I shared above should have additional info on using the API too
i look at the doc and i dont even know how to do it
doesnt clearly say what i am supposed to do
look like i need to do on subscription item level
What doc are you looking at?
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 need to update product_id and price_id in the subscription
so i think i should use the subscription item.
There are docs for upgrades and downgrades in the link I shared above -- this one walks you through the changes you'd need to make: https://docs.stripe.com/billing/subscriptions/upgrade-downgrade
please read them carefully
i need help with code. should i create new thread with code help?
๐ We can chat here
subscription_id = "sub_1Pcw1ZH5ocKrGenqXorZjlU6"
item_id = "si_QTtpbAULjJ9lpY"
Stripe::Subscription.update(
subscription_id,
{
items: [
{
id: item_id,
deleted: true,
},
{
price: "price_1Q0UkcH5ocKrGenqGrYE9p4S",
quantity: 3,
},
],
discounts: [{
coupon: 'L6lE9sbB',
}],
}
)
i have this
but it give me wrong price.
not sure where Remaining time on 3 ร Linq One (with $249.00 off) after 24 Sep 2024 come from.
this plan was on Staging Linq Pro Plus. and i wanna switch to Linq one - quantity 3.
also coupon was applied and removed.
Okay, looking at this: https://dashboard.stripe.com/test/logs/req_Z2u40QTYfb1bXW