#vidya-p_api

1 messages ยท Page 1 of 1 (latest)

urban hollowBOT
#

๐Ÿ‘‹ 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/1301271361670479973

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

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

olive rune
#

Hello

mental wraith
#

Hello

olive rune
#

No way to change a Sub's status arbitrarily, no.

#

It is tied to the status of the most recent Invoice

#

Thinking about what sort of workaround you could use here...

#

Overall I think the best thing to do here is to set metadata on the Invoice if this scenario occurs and then you can check for open Invoices based on their metadata on a ~daily cadence and void them if they meet your criteria.

mental wraith
#

The crux of the issue is to detect an invoice has become overdue, since no webhook events are being emitted for this.
The workaround we implemented was using the subscription status for detecting this:

  • When the subscription is in active state, this is straightforward because the sub itself moves to past_due , we then void the latest finalized invoice which is the overdue invoice
  • The problem arises when the subscription is already in past_due state (e.g. because of a failed SCA auth during payment) .. in this case there is no change in sub status when latest invoice becomes overdue - hence the workaround fails in this situation
olive rune
#

Hmm you are a connect platform creating Subscriptions on your Connected Accounts' here?

#

So you don't have control of the Sub settings

mental wraith
#

Yes, our Stripe integration is set up such that Subscriptions are created on Connected accounts only not the platform account

olive rune
#

Yeah okay then using metadata and tracking this on your end is really the only way to handle this specific scenario unfortunately.

mental wraith
#

Now for "you can check for open Invoices based on their metadata on a ~daily cadence and void them if they meet your criteria." - is there any provision in stripe for this?

olive rune
mental wraith
#

So, it would have to some kind of a cron job at our end?

olive rune
#

Correct

mental wraith
#

I across this during one of my google searches

If your settings specify that overdue invoices should be voided after a certain period, the invoice.voided event will trigger.

#

Is there any config setting for the above?

olive rune
#

Yes, but those settings are on your Connected Accounts so you don't have control over that.

mental wraith
#

Who typically would have access to those settings? And how do I access those settings?

olive rune
#

Your Connected Account user would have to login to their Dashboard and adjust those settings.

mental wraith
#

The settings icon that I see when I am examining a subscription in the connected account - what does that refer to ?

olive rune
#

That is still your settings

mental wraith
#

Who is a 'Connected Account user' ?

olive rune
#

Whoever controls that Connected Account. Unless these are all your accounts?

mental wraith
#

Ok, so basically the owner or Admin for the connected account?

olive rune
#

Yes

mental wraith
#

Ok, will figure that out

#

in the meanwhile - would you have a screenshot or help link to the config setting that specifies that overdue invoices should be voided after a certain period, the invoice.voided event will trigger. It would be helpful to provide the context

olive rune
#

You should be able to see that in your own Dashboard at the link I provided above

#

Ah actually

#

For send_invoice I don't think you can directly void

#

However you can mark it uncollectible

#

And then handle from there (that would trigger a webhook)

#

It is under the Manage invoices sent to customers section

mental wraith
#

Sorry wrong screen shot ๐Ÿ™‚

olive rune
mental wraith
olive rune
#

Yep

mental wraith
#

so, as you can see i do have it configured - but the event is not triggering and that is because this is not configured at the connected account level?

olive rune
#

Correct

mental wraith
#

Thank you for all the help! I'll reach out to the connected account admin