#jacobjensen

1 messages ยท Page 1 of 1 (latest)

exotic krakenBOT
hardy loom
#

Hi there!

#

Can you clarify what you are trying to do, and what exactly is the issue?

river nexus
#

Hi Soma! So I have a subscription schedule where I would like to change the collection method from "send_invoice" to "charge_automatically". I can easily do this using the dashboard, but when I attempt to do it via the API, it is not quite working.

hardy loom
#

it is not quite working
What does that mean? Do you get an error message? Can you share the request ID (req_xxx)?

river nexus
#

give me 1 minute - i just need to recreate the scenario

#

But I do not get an error. It simply removes any future invoices from the subscription and states that: you can only specify 'days_until_due' if invoice collection method is 'send_invoice'

#

the subscription I would like to update the collection method for is "sub_sched_1NNtliE5RkzLDNUxlXBoE8WA"

#

and I can do this via the dashboard by clicking "Update Subscription" and change the payment method

hardy loom
#

I would need a request ID (req_xxx) to investigate this.

river nexus
#

how do i retrieve the request ID?

#

I have an event id

hardy loom
river nexus
#

thank you

#

req_cMDco4mLS6odkw

hardy loom
#

It simply removes any future invoices from the subscription and states that: you can only specify 'days_until_due' if invoice collection method is 'send_invoice'
Where do you see this?

river nexus
hardy loom
#

Got it. Give me a few minutes to look into this.

#

Still looking into this, give me a couple more minutes

river nexus
#

of course

hardy loom
#

okay I found the issue, and I think I have a solution for you.

river nexus
#

that sounds amazing ๐Ÿ™‚

hardy loom
#

the issue is that when you created the schedule, you set invoice_settings.days_until_due: "14" in the phases themselves.
And later when you update the schedule to charge_automatically you don't update the phases. So they sill have invoice_settings.days_until_due: "14". But for charge_automatically subscription that doesn't make sense.

#

So you have two options:

  1. When you create the schedule in the first place, don't set invoice_settings.days_until_due for each phase. Instead just set it once in the default_settings.
  2. Or if you have to set days_until_due in the phases themselves, then when you update the schedule you need to update every phase to remove days_until_due
river nexus
#

it doesn't look as if it possible to set the days until due parameter in default settings?

#

ah under invoice settings ๐Ÿ™‚

river nexus
#

Soma, you have just saved my entire week!

#

thank you so much - your solution works like a charm ๐Ÿ™‚

hardy loom
#

That's great to hear ๐Ÿ™‚