#dave_73622

1 messages · Page 1 of 1 (latest)

native yewBOT
median bane
#

Hello

fleet tartan
#

hi!

median bane
#

An Invoice will attempt to finalize until auto_advance is turned off.

fleet tartan
#

is auto_advance a setting i turn on in the dashboard?

median bane
#

But it also does related to the Subscription status.

#

If the Subscription is past_due and a new Invoice is generated then it will still have auto_advance be true

fleet tartan
#

ok. so if i would like to ensure the invoices remain in an auto_advance state, then i just need to configure my subscription settings to leave the subscription status in a past_due state when payments fail

#

is that right

median bane
#

Mostly yes... but at this point I'm not positive what you are trying to accomplish.

#

Do you want to keep generating Invoices and attempting to charge them when Subscriptions go unpaid?

#

Instead of having the Subscription cancel for instance

fleet tartan
#

yes. i don't want to cancel subscriptions because of past due invoices.

i just want to block access to my application when there are past due invoices, and direct customers to the billing portal to pay their past due invoices and regain access to the application.

#

so, im trying to code the logic for this by pulling in the users invoices via the API, and then looking at their statuses.

median bane
#

Hmm okay

fleet tartan
#

if they have 1 or more open status invoices, then im blocking them from the app.

median bane
#

The way Subscription statuses work is that as soon as the most recent Invoice is successfully paid the Subscription moves to active

fleet tartan
#

but i want to make sure they can pay them via the billing portal. so i dont want them in a draft state.

median bane
#

But it sounds like you are ignoring the actual subscription.status here?

fleet tartan
#

i am because that wasn't working for my use case. i was finding that, under certain conditions there were invoices that were in a draft state while the subscription status was past_due or unpaid

therefore - the customer could not pay the draft invoice via the billing portal because draft invoices don't show up there.

#

so instead of looking at the sub status, now im thinking i need to look at the invoices statues

median bane
#

Okay as long as you are ignoring the actual subscription.status then yes the above works well

#

(Changing your settings so that the Subscription stays past_due)

#

Make sure to test this all out with Test Clocks as well!

fleet tartan
#

sweet. thanks!