#nadia - subscription schedule

1 messages ยท Page 1 of 1 (latest)

halcyon oar
#

Just curious, why do you need billing cycle anchor to be a different date than when the phase starts?

limber linden
#

hi @halcyon oar, thanks for reaching out
it's for accounting management

#

here is my request :

#

stripe.subscriptionSchedules.create({
customer: customerId,
start_date: startDate,
end_behavior: 'release',
metadata,
phases: [
{
items: [{
price_data: {
currency: 'EUR', // ISO 4217 CURRENCY CODES
product: productId,
recurring: {
interval: 'month'
},
unit_amount: amount // decimal
},
quantity: 1
}],
iterations: 1
},
],
default_settings: {
billing_cycle_anchor: debitDate,
default_payment_method: paymentMethodId
}
});

halcyon oar
#

So you want the subscription to start on start_date, but you don't want the customer to be charged until billing_cycle_anchor? Just curious what exact behavior you want here. Why not have start_date the same as what you want billing_cycle_anchor to be?

limber linden
#

yes that's correct

#

is it possible to do it ?

#

i need my invoice to mention that the start date is the first day of the month

#

& my customer is billed on the 8th or 12

#

of the month

#

it's corporate reasons

left narwhal
#

Hello I am helping codename_duchess look in to this. I am still a bit unclear on your use-case. Are you looking to always bill on the 8th or 12th but for all of your invoices to say the 1st until the end of the month?

#

Or is this only the first invoice that needs to mention that date?

limber linden
#

hello @left narwhal thanks for joining us
i'm looking to alway bill on the 8th or 12th (the customer choose the day on his subscription) & the invoice is always from the first day to the last day of the month

left narwhal
#

Thank you for clarifying. Unfortunately I am not currently seeing a way to configure that with subscriptions or subscription schedules. I am looking a bit deeper in to this to double check.

limber linden
#

thanks ๐Ÿ™

left narwhal
#

Unfortunately it does not look like we have that capability at the moment. If the anchor is on the 8th, the invoices will all show the 8th to the 7th on all invoices. If the invoice only needs to "mention" the period you may be able to communicate that through the Invoice's description (which gets displayed to the user) but I don't know if that would look good or be clear enough for them https://stripe.com/docs/api/invoices/update#update_invoice-description

limber linden
#

thanks for your response
is there a way to add the description while creating the subscription schedule please ?

#

regarding the error & my context : StripeInvalidRequestError: Invalid default_settings[billing_cycle_anchor]: must be one of phase_start or automatic what should i set please ?

unkempt pawn
#

๐Ÿ‘‹ Hopping in since @left narwhal had to head out

#

No, there is no way to set the invoice description through the subscription schedule phase - you would need to listen to the invoice.created webhook event to know when a new invoice is created and then update it.

#

and you'll want to use phase_start for billing_cycle_anhor

#

One more suggestion I want to make is that you could have your subscription anchored to the first, update each Invoice to set auto_advance: false so that they are not automatically charged, and then continue with finalizing and charging them on the date you want

limber linden
#

hi @unkempt pawn thanks for your response
i think that i wont catch the invoice to update the description, we'll display it on the app instead (it's more simple)

#

regarding the billing_cycle_anchor i read the documentation but can't find the difference with phase_start and automatic. could you explain to me the differences please ?

#

i'm not sure to understand your last message sorry : "One more suggestion I want to make is that you could have your subscription anchored to the first, update each Invoice to set auto_advance: false so that they are not automatically charged, and then continue with finalizing and charging them on the date you want"

unkempt pawn
#

phase_start will force a billing cycle reset even if one isn't needed - automatic will only change the billing cycle anchor in certain situations (like ending a trial, or moving between two prices that are different recurring lengths like monthly -> yearly)

#

The alternative I mentioned is just another option: Normally invoices are created, and automatically finalized + charged an hour later. Instead of doing that you can wait for the invoices to be created, disable the automatic finalization, and then finalize/charge it at whatever point you want

limber linden
#

i don't have fixe prices & it's always a monthly payment

#

there is no trial too

#

sometimes they can use sponsorship code but that;s all

#

in my case phase_start & automatic is the same

#

?

unkempt pawn
#

If you want to be sure that the billing cycle anchor will be reset when you move to the next phase then you want to use phase_start]

limber linden
#

what do reset mean please ?

#

i want it to be always the same

unkempt pawn
#

let's back up - what do you want to happen when you move from Phase A -> Phase B

limber linden
#

i use subscription schedule to create a subscription starting next month, that's all

#

after the creation the subscription continue the same way as the first month

#

billing monthly

#

same price etc.

#

my subscriptions always starts the 1st day of next month

#

and renewed every month
for instance
sub creation for august 1st
sub renewal september 1st
... october 1st ...

unkempt pawn
#

Then why do you need additional phases? You should be able to model this with a single phase, so there's no need to worry about billing_cycle_anchor at all

limber linden
#

i have no additional phases

#

should i delete the phase object ?

unkempt pawn
#

You should keep the phase object, you just don't need to set billing_cycle_anchor at all

limber linden
#

ahhhh okayyy

#

thanks a lot for your help

#

i delete it right now

unkempt pawn
#

๐Ÿ‘