#brianp - billing cycle anchors

1 messages ยท Page 1 of 1 (latest)

rugged pollenBOT
old oriole
#

Hello ๐Ÿ‘‹
Not sure I completely follow, can you share an example?

raw leaf
#

Sure

#

Do you need example ids from stripe? Or do you need me to explain the scenario?

old oriole
#

Either of them works, whatever is the easiest for you

raw leaf
#

The scenario is:

  1. A customer and 14-day trial subscription is created on Dec-3.
  2. Their trial ends on Dec 17th, they don't pay, and their subscription becomes past_due and unpaid.
  3. The customer returns on Feb-1 and pays the latest invoice to make their subscription active.

Expected: After 3, the billing cycle is on the 1st.
Actual: The billing cycle is on the 3rd. The customer is charged again on the Feb 3rd.

I want to update the billing cycle to be on the 3rd but this creates an invoice and automatically charges the customer.

edit: sorry this example is bad

#

I have an example customer where I reproduced the scenario with test clocks: cus_NJIMJ3NPio1aJB

On Feb. 20th, the trial ended.
On April 13th they paid the latest invoice in_1MYfoRLGmb2h8RE1zHwIqFel
On April 20th they will be charged again.

#

I want to update the billing cycle anchor on to be on the 13th when they pay. If I try making a prorated/non-prorated change the billing cycle, the customer is invoiced and charged again immediately. An example where I changed the billing cycle is: cus_NJXSJdhTD1ujeE

The documentation says the 2nd way to do this is by adding a trial period, but this has 3 problems:

  1. Breaks our reporting of how many trial users we have.
  2. Breaks our UI and will show the user a banner that they are trialing.
  3. The customer portal will confusingly tell the customer they are on a trial.
old oriole
#

Gotcha, thank you for providing more info.
Reading now..

raw leaf
#

Thanks!

lucid rover
#

Thanks for the info. Trying to think of how you can update this subscription, you definitely should be able to update it without charging...

raw leaf
#

I tried to pause the subscription and change the billing cycle anchor, but that didn't work: com.stripe.exception.InvalidRequestException: You cannot create a new invoice for a paused subscription. Unpause the subscription before attempting to create a new invoice.; request-id: req_hqE1PA7GKL7Vc1

lucid rover
#

So one option I can think of is using proration_behavior=create_prorations, that shouldn't charge immediately. It would create invoice items for the proration but I think you can delete those before they get charged.

#

Would you be open to a workaround like giving the user credit or a coupon that would reduce that first new invoice to $0?

raw leaf
#

I could try that. It would be better than issuing refunds.

#

Applying a credit works when I did this manually in the UI - sub_1MZFYRLGmb2h8RE1lxsBrh8V

Thanks Pompey.

I really wish it was possible to change the billing cycle anchor without invoicing and without using a trial period, like this

SubscriptionUpdateParams params =
  SubscriptionUpdateParams
    .builder()
    .setBillingCycleAnchor(SubscriptionUpdateParams.BillingCycleAnchor.NOW)
    .setBillingCycleAnchorChangeBehavior(SubscriptionUpdateParams.BillingCycleAnchorChangeBehavior.DONT_INVOICE)
    .build();
lucid rover
#

Yeah, I will put in a feedback request to allow that. I do see why one would want to do that

#

Glad the credit solution is viable for you!

raw leaf
#

Thanks ๐Ÿ™‚

lucid rover
#

brianp - billing cycle anchors