#zonos-dustin_api

1 messages ยท Page 1 of 1 (latest)

honest prismBOT
#

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

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

hidden lodge
#

I am getting a different error here. https://docs.stripe.com/api?lang=cli&shell=true&api=true&resource=invoice_line_items&action=list in the interactive cli.

{
"error": {
"code": "resource_missing",
"doc_url": "https://stripe.com/docs/error-codes/resource-missing",
"message": "No such invoice: 'in_1Q4tZYLTGhL6Kyay1Y5lWrRc'; a similar object exists in live mode, but a test mode key was used to make this request.",
"param": "invoice",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_Poco1lEERYUHdw?t=1728339450",
"type": "invalid_request_error"
}
}

tawdry orbit
#

Hello! Looking now, hang on...

hidden lodge
#

Thank you!

tawdry orbit
#

Ah, okay, for some reason it seems to be called stripe invoiceitems in the non-Dashboard CLI.

hidden lodge
#

Invoice Items are not invoice lines though.

tawdry orbit
#

So try stripe invoiceitems list in_1Q4tZYLTGhL6Kyay1Y5lWrRc --limit="100" --live if that Invoice is in live mode.

hidden lodge
#

hmm. lemme try that

tawdry orbit
#

(Edited that command to move the --live flag to the end.)

hidden lodge
#

I got "unknown flag: --live"

#

ok. i'll try that again.

#

"stripe invoiceitems listrequires exactly 0 positional arguments. Seestripe invoiceitems list --help` for supported flags and usage"

tawdry orbit
#

Ah, wait, hang on, I mistook one API for another. This is a different API/object than the one you want...

hidden lodge
#

ok.

tawdry orbit
#

Unfortunately it looks like invoice_line_items is broken in the actual CLI. I'll flag that internally and we'll get it fixed.

In the meantime, you can still use the CLI, but you'll need to describe the request you want verbosely with stripe get like this:

stripe get /v1/invoices/in_1Q4tZYLTGhL6Kyay1Y5lWrRc/lines --limit 100 --live

Does that work as expected?

hidden lodge
#

That does.

#

Now I've got a bigger problem I just noticed on this invoice.

#

Can you perhaps tell me why the dashboard says this price "price_1PcstALTGhL6KyayP5V3hdvI" is listed at $0.01 per unit, and the invoice says that it is billing at $1.00 per unit?

tawdry orbit
#

When you say "the invoice says that it is billing at $1.00 per unit" what is that referring to exactly?

#

To me it looks like the unit amount on the Invoice matches the Price as expected.

hidden lodge
#

Oh. nvm. I was being an idiot.

#

Scared me. I was reading the invoice out wrong.

tawdry orbit
#

Ah, glad it was something like that and not a real issue (especially in live mode). ๐Ÿ™‚

hidden lodge
#

Sheesh yeah. *face-palm

#

Ok. Yeah, I think you've got me squared away. Do you have a doc link in how to use the "stripe get" function you sent me. Is it just "stripe get {api url} {flags} ?

tawdry orbit
#

Sorry about the trouble with invoice_line_items not working as expected. I flagged that internally and hopefully we can get that sorted out soon. In the meantime you can use the workaround. Oh, also, if you're curious about the full list of supported resource commands, run stripe resources (that's how I found out invoice_line_items was missing).