#solancer

1 messages · Page 1 of 1 (latest)

wide fernBOT
wispy granite
shell rapids
#

yes I have a request ID just a second

#

yes regarding the phases I see there is only 2 states automatic and phase start

#

no way to set a particular date to send out the invoice

#

is there something I'm missing in phases documentation ?

#

This is the subscription request id - sub_sched_1MHwDHAmPvfMjSzzs373a4zR

wispy granite
shell rapids
#

this one

wispy granite
#

ok, I don't see you set billing_cycle_anchor. Where do you see the error you mentioned?

shell rapids
#

I am unable to set it to a date

#

When i look at the BillingCycleAnchor types - it has only 2

#

^I get a typescript error when assigning a date

wispy granite
#

ah yes it's an enum either automatic or phase_start. You can adjust the billing cycle by setting the phase start date and end date, why would you still want to use billing_cycle_anchor here?

shell rapids
#

We need to send out the invoice 5 days prior to the scheduled Subscription becoming active.

#

using phase start date and end date would I be able to send the invoice 5 days prior to the subscription becomes active?

wispy granite
#

Like you start the Subscription in 7 days, and after 2 days you want to send the Invoice?

#

Hmm

#

Do you need it for every cycle or just the first cycle?

shell rapids
#

first cycle

#

for instance

Scheduled Subscription is set to become active on 10th of January 2023

Invoice need to be sent out on 5th of January 2023

5 days prior to the subscription becoming active

sterile flint
#

that's not really possible with how Stripe subscriptions are modelled. An invoice is created at the start of a billing cycle(the billing cycle starts at the same second the invoice is nominally created at)

#

probably you'll nee to generate some custom PDF from your own code unrelated to the actual Subscription or Schedule and send that to to user for your purpose, something like that

shell rapids
#

Ah ok. Is there a way to generate a draft invoice from our code and send it across to our customers?

#

using stripe

sterile flint
#

depends really! I mean you can create a one off invoice and mark it paid or something and hack with that for this purpose

shell rapids
#

Oh ok, let me check this and inform my company.

shell rapids
#

I will explore this and ask my company if this is OK.