So I am using stripe API to charge the user. When creating a billing portal session I am trying to pass the billing_cycle_anchor=now as a parameter so when a user updates a subscription he should be charged immediately/invoice.
It says it needs to be a future time. The billing cycle anchor should be Current date time +months (1):formatted as UNIX (i.e the date of the next invoice)
You can set the billing cycle anchor / proration behaviour in the Stripe dashboard then redirect customers to a portal. Alternatively, you can use the update a subscription API call detailed here: Stripe API reference – Update a subscription – curl and the billing_cycle_anchor parameter like you’ve done correctly as a parameter in your portal session API call.
I am having a similar issue - any chance you can screenshot how to use the API call to update a subscription alongside the billing portal API call in the workflow? I am using a custom billing portal, but need to be able to update the billing cycle anchor and proration date
You need to make the API call and set the anchor parameter. For further information please refer to the stripe documentation as it explains everything in detail.
I have read the Stripe documentation and scoured the forum for weeks, but it is not clear how to incorporate the ‘update customer subscription’ call that has the billing_cycle_anchor parameter with the configured portal session. I was hoping someone could screenshot their workflow setup to see how they did this. Thanks anyway.