#johann_subscription-billingcycle

1 messages ยท Page 1 of 1 (latest)

vital owlBOT
#

๐Ÿ‘‹ 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.

lavish stirrup
#

This puts the question in a better context

round nexus
#

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?

lavish stirrup
#

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

round nexus
#

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?

lavish stirrup
#

You cannot use the "Stripe Trial" for this as that has a zero price

round nexus
#

what has a zero price?

lavish stirrup
#

If I try and use Free Trial Days in the Stripe dashboard creating the subscription

round nexus
#

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

  1. Use the 90โ‚ฌ Price
  2. Set trial_end a trial for a month (no charge)
  3. Set billing_cycle_anchor to what you need (July 1st)
  4. Use add_invoice_items to 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

vital owlBOT
lavish stirrup
#

Thanks, let me consume that and see. Will attempt in the dashboard quickly

round nexus
#

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

lavish stirrup
#

Ok - then let me bash it in the API quickly - will throw some code together ๐Ÿ™‚

#

Works in the Dashboard as well ๐Ÿ‘€

round nexus
#

huh I didn't expect that you could do all #2 and #3 together in the Dashboard!

lavish stirrup
#

sub_1PMZ6AQeTVnMyqsf9dEYgoDI

round nexus
#

it doesn't do #4 in that example right?

lavish stirrup
#

Works perfect - thanks for the help. Been hacking at it for 2 days ๐Ÿ˜†

#

yes it did

#

last screenshot is better

round nexus
lavish stirrup
#

first event evt_1PMZ6DQeTVnMyqsf5IvTZOjv

round nexus
#

If you write real code for it yourself, don't do that. Pass add_invoice_items instead on the Subscription creation, much better

#

Glad it's working though! I got to run too but @granite bronze is around if you need further help!