#estevanjantsk -invoice
1 messages · Page 1 of 1 (latest)
do you have an example of an Invoice in_xxx that you updated that way through the API?
yes
wait a sec
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
in_1LcolpCJhVNaesyVe0k0gWu1
days_until_due is not an actual field on the Invoice object. It's a parameter and the idea is it's a 'shortcut' and has the effect of setting due_date to a relevant timestamp
as for why due_date is null here, not sure yet, looking
ah it's because the invoice is still draft
the date is only set when the invoice is finalized, and then the due_date becomes "time invoice was finalized + 7 days".
does that help @oak glacier ?
yep. And then when you finalize the invoice the value would get used. Do you see otherwise when you test?
hmm
but why I can see this https://dashboard.stripe.com/test/invoices/in_1LcolpCJhVNaesyVe0k0gWu1/edit
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
in the dashboard even thought the invoice is still in draft mode
not sure I follow the question. Do you expect to not be able to see the draft invoice for some reason?
I will try to explain
I have this invoice X in draft mode. If I update this invoice X via api with days_until_due to 14 days. I will get due_date null (as you said because the invoice is in draft mode). But if I go to de dashboard to the invoice X page the invoice is in draft BUT I can see the due data as 14 days
so basically in the interface I get the due_date but via api I don't get the same data (because looks like I have to change the invoice status to finalised)
yeah the dashboard and the API are different really
🥺
why is it a problem exactly?
because I've been working in this webapp where I can create invoice
and edit them while they are on draft mode
are you saying that if you update days_until_due to 7 in the API then open the editor in the dashboard it says 14 like in your screenshot?
yeah but I don't get why you'd use both the dashboard and the API, if it's a webapp then you'd only be using the API so it doesn't really matter what the dashboard does
So I can't see the current state of the due_date
yep, we know internally what value was set, but it's not exposed in the API today
I can see how that's annoying but it's not something that's likely to change unfortunately