#TylerG-subscription
1 messages ยท Page 1 of 1 (latest)
The customer wont have any payment methods, so im not sure charge_automatically will work but send_invoice is what I explicity dont want
I know I can mark the invoice as paid out of band which is what I believe I want, but how do I prevent it from sending?
Let me take a look, in the meantime I'm assuming you've had a chance to take a look at this yes?
https://stripe.com/docs/billing/subscriptions/migrate-subscriptions
I must have been more tired than I thought last night ๐ฅฒ not sure how that slipped by
Ah no worries ๐
Feel free to refer to it and let me know if you have any follow ups
This thread has been archived. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Thanks
NP! ๐ mind posting your questions here again?
Yup, so from a high level I am trying to generate a subscription/invoice for the dates 9/1/2021 - 9/1/2022
I have a price w/ a yearly interval
when I use subscription schedule to try and create this, I end up with an invoice with two line items, one for for 9/1/2021 - today protation
and a new 1 year subscription, so roughly 1.5x the expected invoice amount
const start_date = moment("09/27/2021").utc().unix();
return StripeAccounts.subscription.subscriptionSchedules.create({
customer,
default_settings: {
billing_cycle_anchor: "phase_start",
},
start_date,
phases: [
{
items: [
{
price: basicPlan,
},
],
},
],
});```
not sure where im going wrong here ๐
Correct, I originally was using just the subscription but I need to create active subscriptions that were paid out of band
You can't turn off proration with a sub schedule. If you backdate when you just create a normal subscription you can turn off proration for that backdated period
how can I prevent Stripe from sending an invoice when I create the back dated subscription? (since that invoice would technically already be paid)
that is helpful thank you, not clear by the docs if disabling proration will stop the invoice from being sent
You would update the invoice to set auto_advance: false if you don't want it sent.
Though it looks like you are using charge_automatically?
With that collection method the invoice will never be sent
sub_1L1BXBGS99mqfAWo07z2YJF1 was created without sub schedules and all the dates are good
I have collection_method: "send_invoice" because none of the customers have payment methods
Got it then yeah that looks good.
so after I create that I can just update the invoice like await StripeAccounts.subscription.invoices.update(resp.latest_invoice.id, { auto_advance: false, });
Then if you don't want the draft to send you can finalize and set auto advance false: https://stripe.com/docs/api/invoices/finalize#finalize_invoice-auto_advance
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
awesome
You can also just set auto advance false and finalize later
Great, I just tested it out and it worked as expected. Thanks for your help!