Update Stripe's billing cycle anchor

Hi everyone,

I’m building my app with a weekly subscription and I need every clients to be charged on the same day (sunday, 11pm)

I couldnt find a way to do it on Stripe so for the beggining I’m using customized free tirals period but it’s not great. So I’ve heard that what I want is possible when calling the Stripe API anf change the billing_cycle_anchor.

Unfortunately I’m not really good at developing and I’m struggling with connecting the API. What keys should I put in and what values ? Do i need to make a workflow connected ?

If someone could help me, you would save my app !

Thank you !
Julien

you easily do it by making thetime duraiotn to custom duration of 7 days, but yah this will not charge every user on same day that is against policies.

like if user subscripbe on saturday, he will be charged on next saturday.

@julien.machuron , you can also do this, create a weekly subscription and whenever a user subscribe , by using billing_cycle_anchor parameter you can make stripe charge the user on sunday, now because billing is weekly, he will get charged to next sunday.

this may solve you issue.

Okay yeah I think this is the way I should do it. Whenever someone subscribes he will be charged on sunday.
But how do I set up this ? On the API connector or in the workflow ?

Use API connector on workflow you , there no anchor option

So I should use the API connector ?
How do you fill the parameters ?

yes, perfect

but you have to extract next sunday , and convert it into Unix time, remember Strip use second and bubble use millisecondsi guess … so you also have to

  • Unix Time in Seconds: Stripe uses Unix timestamps in seconds for all date and time representations. For example, the created attribute in various objects is a Unix timestamp in seconds.

Stripe Docs

  • Conversion to Milliseconds: If your application or platform (such as Bubble.io) uses milliseconds, you’ll need to convert Stripe’s timestamps by multiplying them by 1,000. This ensures consistency across your application’s time representations.

If it still not work, ping me i would love to walk you through, but i suggest do it yourself, unless you do it you wont learn.

Thank you for your help, really appreciate it !

So if I understand, I should put a parameter with billing cycle anchor as key and the timestamp as value ?
Are there other parameters I should add ?

Also, considering the fact that the timestamp will be different from a customer to another one, maybe this timestamp should be indexed on the current time/day of the week. How can I do that ?

Thank you a lot !

1 Like