#thomasmol_best-practices

1 messages ยท Page 1 of 1 (latest)

next emberBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1336308507070304298

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

shadow ginkgo
#

๐Ÿ‘‹
Do you want the upgrade to take effect immediatly or at cycle end ?

digital grail
#

immediatly

shadow ginkgo
#

Have you tried to specify the proration_behavior to always_invoicewhen making the update?

digital grail
#

no, but will that finalize the invoice when creating the update?

shadow ginkgo
#

It should create the invoice yes. It will be finalized and paid if you have auto_advance enabled on your Subscription.

digital grail
#

should it also create the invoice for schedule updates?

#

i just tried that and it did not create and finalize an invoice

shadow ginkgo
#

You set the proration_behavior at root level of the schedule or the impacted phase? It should be on the impacted phase.

digital grail
#

i am doing this:

await stripe.subscriptionSchedules.update(scheduleId, {
      proration_behavior: 'always_invoice',
      phases: [
        {
          start_date: schedule.current_phase.start_date,
          currency: customer.currency,
          items: prices.map((price) => ({
            price: price,
          })),
        },
      ],
    });```
#

and i call the create sub schedule with from_subscription before if the sub does not have schedules yet

shadow ginkgo
#

Try setting proration_behavior: 'always_invoice' under phase[0]

digital grail
#

ahh

#

okay let me try taht

#

thanks