#abhinav_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/1318557749574893619
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ happy to help
you can pass in 2 prices within the PL line_items
but the trial will apply to both
will it let me offer controls trial for both products separately?
yes. that's what I found.
you can apply either a one-time fee for the time of the trial that should be paid by the second subscription item
or you can do a discount instead of a trial for the first price
can we apply discount on a single product within a subscription
yes
can you also elaborate this - you can apply either a one-time fee for the time of the trial that should be paid by the second subscription item
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok let's say both prices are on a monthly basis
and you're setting a trial for 7 days on the subscription
which should only apply on price1
price 1 is 10$ and price 2 is 20$
basically the 7 days would be ~5$ for 7 days
so in the PaymentLink you can add a one-time price (not recurring) covering the 5$ for price 2 within the trial period
Are these monthly prices? - price 1 is 10$ and price 2 is 20$
yes
I don't understand this - basically the 7 days would be ~5$ for 7 days
basically the first invoice would include
price 1 ----- 10$
price 2 ----- 20$
price 3 ----- 5$
total ------- 35$
next invoices
price 1 ----- 10$
price 2 ----- 20$
total ------- 30$
the idea is 20$ for ~30 days -> ~5$/week
But the first bill has a trial so the bill should be less than the second month.
the trial period is added days
oh oh
yes sorry
my bad! ๐ฆ
basically the first invoice would include
price 1 ----- 7.5$
price 2 ----- 15$
price 3 ----- 5$
total ------- 27.5$
next invoices
price 1 ----- 10$
price 2 ----- 20$
total ------- 30$
Basically our scenario is we may give 3 months free for product 1 and 1 month free for product 2.
Will discounting be a simpler option?
Then I will move in that direction.
yes way simpler!
I will read this doc.
so you apply 2 coupons
1 coupon for the first price with 3 https://docs.stripe.com/api/coupons/object#coupon_object-duration_in_months and the other with 1 for the second price
make sure to use the applies_to with a list of product IDs
and make sure that price1 and price2 are created on 2 different products
Thanks. I will starting reading.
let me know if you need any more help
Can we reuse a coupon for all the customers or do we need to create a new one?
they can be reused
Which means I can create 2 coupons for our 2 products in the portal and then configure them in our code. And for each new user sign up, we keep applying the same coupons.
yes that's correct
you can actually test this out with test clocks
and see how the invoices are being generated for each cycle
Yes, I have tried this before for future invoices.