#solancer
1 messages · Page 1 of 1 (latest)
Hi, do you have a request id? I believe you can set the billing_cycle_anchor for each phases in the Subscription Schedule API https://stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-phases-billing_cycle_anchor
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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
You can find your request id in https://dashboard.stripe.com/test/logs
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
this one
ok, I don't see you set billing_cycle_anchor. Where do you see the error you mentioned?
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
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?
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?
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?
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
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
Ah ok. Is there a way to generate a draft invoice from our code and send it across to our customers?
using stripe
depends really! I mean you can create a one off invoice and mark it paid or something and hack with that for this purpose
Oh ok, let me check this and inform my company.
I will explore this and ask my company if this is OK.