#ashleyyy_api

1 messages ยท Page 1 of 1 (latest)

prime oakBOT
#

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

๐Ÿ“ 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.

sharp kelp
#

Hello! That's not a bug. The days_until_due parameter is a convenient way to set the Invoices' due date without specifying a specific timestamp. You can look at an Invoice's due_date to determine when it's due. If you want to store the specific number of days you set for days_until_due separately you can add that as metadata on the Invoice.

unborn flicker
#

Hmm, I should have also said that when I set the days_until_due value via update, it updates the due_date to null. It's not until the invoice is finalized that the due_date is set.

#

When I set that value via create it sets the due_date to a timestamp that's the number of days out, but the inconsistent behaviour is what prompted me to ask.

sharp kelp
#

That makes sense, the due date can't be set until the Invoice is finalized.

#

Well, I should be more specific...

#

The due date can't be changed before it's finalized, via an update, when using days_until_due.

unborn flicker
#

That all makes sense except for the part where I can't access the days_until_due that I had previously set. I'd really like to make that value available to my users.

unborn flicker
sharp kelp
#

The key thing to understand is that Invoices don't have a days_until_due property. We do have a days_until_due parameter as a convenience feature for setting the due date, but it's not a property you can retrieve.

#

Looking now...

unborn flicker
#

Yeah, I understand that. I'm just hoping that it can be changed and would like to know how I might encourage y'all to do it ๐Ÿ™‚

sharp kelp
#

I can flag it as a feature request internally, but candidly, it's highly unlikely this will ever change on our end. That said, can you tell me a bit more about why you want this behavior? If I understand more about what you're trying to do I might be able to suggest a better approach or workaround.

unborn flicker
#

๐Ÿ˜„ Thanks for managing my expectations! I want to days_until_due to be available on the Invoice object so that I am able to discern if a given Invoice will receive a due date upon finalization or not. I'd also like to be able to expose it to my users in our editor, since we're using Stripe's invoicing API to build an invoicing integration with our app. If I had this parameter, I'd be able to let my users know what they had set it to. Very similar to your own UI.

#

The workaround using the metadata is fine, thank you.

sharp kelp
#

Ah, yeah, that's essentially what I was typing out. ๐Ÿ˜…

#

That's how I'd build it. I'd throw a timestamp in metadata that equals the amount of time from the number of days when I set it, and I'd also probably include the actual number of days, then test that in test mode and make sure it all works as expected.

unborn flicker
#

Thanks! Can I ask you a sort of related question?

#

I've also been tasked with customizable reminder emails for invoices, and I see that there's a setting in the UI for that on Connected accounts, but not the API. Which I believe means I can't set it via the API and need confirmation on.

#

We're issuing invoices from our Platform account using the on_behalf_of for the Connected ones.

sharp kelp
#

Which specific setting are you referring to?

unborn flicker
#

My team has the idea that the settings in the Platform account around reminder emails are going to be followed if there's nothing set in the Connected account, so I need to confirm that too.

unborn flicker
#

"Send reminders if one-off invoice hasn't been paid"

sharp kelp
#

It's my understanding that those settings apply to payments which exist on your platform account. If you're using on_behalf_of the payment still exists on your platform account as a destination charge, so those platform-level rules will apply. This would be different if you were doing a direct charge that existed on the connected account. Have you observed different behavior?

unborn flicker
#

It's not been something we've had much luck testing, we're still just doing this in our test account and I don't think automated emails are sent from there.

sharp kelp
#

Ah, gotcha. Yeah, if you're using destination charges you shouldn't have anything to worry about regarding the settings on the connected accounts.

unborn flicker
#

Interesting. Okay thank you so much for your help!