#johann_subscription-billingcycle
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1246144913289117797
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
This puts the question in a better context
Trying to grasp it but really struggling. Not your fault or anything but this looks like such a complex business model ๐
So basically you want a normal trial and a partial first month after that right?
Actually quite a standard practice. Clients typically want to have their payments go off their bank accounts at the end of the month, when they get their salaries paid. At the same time they want to start using a service, and usually they don't want to wait until the end of the month, they want to start immediately. So there you sit, you try and entice they client by offering a trial, they like it want it and boom you have a mix of parameters that's tricky to implement without doing lots of manual work. So to answer your question, no it's not a complex business model
So in your example you create the Subscription on May 20, you set trial_end to a unix timestamp for June 20 and then you set billing_cycle_anchor to a unix timestamp for July 1st right?
You cannot use the "Stripe Trial" for this as that has a zero price
what has a zero price?
If I try and use Free Trial Days in the Stripe dashboard creating the subscription
Ah sorry I get what you meant, the Price is not 0, but we (Stripe) don't charge for the trial
Here's what I would do
- Use the 90โฌ Price
- Set
trial_enda trial for a month (no charge) - Set
billing_cycle_anchorto what you need (July 1st) - Use
add_invoice_itemsto charge the 45โฌ for the paid trial
that can all be done in one API request and should match exactly what you need
johann_subscription-billingcycle
Thanks, let me consume that and see. Will attempt in the dashboard quickly
I am fairly confident the Dashboard won't support this at all. You'll need to write real code to integrate this in Test mode and test it end to end
Ok - then let me bash it in the API quickly - will throw some code together ๐
Works in the Dashboard as well ๐
huh I didn't expect that you could do all #2 and #3 together in the Dashboard!
sub_1PMZ6AQeTVnMyqsf9dEYgoDI
it doesn't do #4 in that example right?
Works perfect - thanks for the help. Been hacking at it for 2 days ๐
yes it did
last screenshot is better
yeah but I don't get where that 45โฌ line item came from. The subscription creation request is https://dashboard.stripe.com/test/logs/req_Icr7xdxdGKLRfX and it only passed the 90โฌ Price id
ah it was done as a separate one-off InvoiceItem first: https://dashboard.stripe.com/test/logs/req_Ishxm2i5N9EkJ5 okay that makes sense now
first event evt_1PMZ6DQeTVnMyqsf5IvTZOjv