#TylerG-subscription

1 messages ยท Page 1 of 1 (latest)

cursive finch
#

Hello ๐Ÿ‘‹
Let's chat here

pseudo rampart
#

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?

cursive finch
pseudo rampart
#

I must have been more tired than I thought last night ๐Ÿฅฒ not sure how that slipped by

cursive finch
#

Ah no worries ๐Ÿ™‚
Feel free to refer to it and let me know if you have any follow ups

glass basaltBOT
#

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

pseudo rampart
#

Thanks

cursive finch
#

NP! ๐Ÿ™‚ mind posting your questions here again?

pseudo rampart
#

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 ๐Ÿ™‚

upbeat harness
#

๐Ÿ‘‹ stepping in here

#

Can you provide the Subscription ID that you tested with?

pseudo rampart
#

Sure thing

#

apologies, here is the correct one sub_1L1BGiGS99mqfAWohEmifpXy

upbeat harness
#

Can you clarify why you are using a sub schedule here?

#

Looks like one phase, no?

pseudo rampart
#

Correct, I originally was using just the subscription but I need to create active subscriptions that were paid out of band

upbeat harness
#

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

pseudo rampart
#

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

upbeat harness
#

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

pseudo rampart
#

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

upbeat harness
#

Got it then yeah that looks good.

pseudo rampart
#

so after I create that I can just update the invoice like await StripeAccounts.subscription.invoices.update(resp.latest_invoice.id, { auto_advance: false, });

upbeat harness
pseudo rampart
#

awesome

upbeat harness
#

You can also just set auto advance false and finalize later

pseudo rampart
#

Great, I just tested it out and it worked as expected. Thanks for your help!