#nukesforbreakfast_docs
1 messages ยท Page 1 of 1 (latest)
๐ 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/1395830396213788684
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
E.G. I don't want the customer to have to input payments twice if they used link, and have two different sets of stored payment methods, etc. etc.
I'm afraid these are the current limitation for metadata search.
To your questions:
Is there some other way to list invoices by metadata that allows both forward and backwards pagination that I don't see?
Unfortunately no.
If not, is it possible to have 2 customers behave as 1 for the purposes of the end user experience?
I'd recommend maintaining the alarm system information in your own database instead of using Stripe, then search within your own data.
Please also note that Stripe has a rate limit in place: https://docs.stripe.com/rate-limits#rate-limiter
It's possible to hit rate limit if the request loads are high for searching purpose.
Yes, alarm system records are maintained in my own database. But, the only relevant field to filter invoices on the list all invoices endpoint is customer. Since it's 1 customer <- N alarm systems <- N invoices, I would have to futher filter the stripe results if I'm querying something like "get me all the invoices chronologically for Alarm System X".
I could store the invoice numbers on the alarm system, but then I'm making however many single get calls, which I figure would be rate limited more quickly than a lower amount of list calls.
Basically, my invoices are on a per alarm system basis. However, 1 customer can own many alarm systems. I don't want to do 1 customer per 1 alarm system because my understanding is Stripe will treat each customer object as separate, meaning things like Link or storing payment methods would be separate for each alarm system, leading to a poor user experience.
Sorry if I'm unclear. What I meant by storing the alarm system records is that the relationships between 1 customer <- N alarm systems <- N invoices should be fully maintained within your database, instead of using Stripe to search for them.
Due to the current limitations on the search and list APIs, alongside with the rate limit considerations, your use case can't be supported now.
but I need to pull invoice information from Stripe for display. How would I do that without calling Stripe?
Stripe will send invoice.* events every time when there is a change to the invoice. All those invoice information could be saved within your database for display purpose in the future
oh ok I understand what you're suggesting now.
Basically use webhooks to duplicate the info into my database and display it from there.
Yes, that's right!
alright, I'll consider that as an option.
Sounds good! Let me know if you have any further question ๐
is there a specific rate limit for the list or search endpoints for Invoices?
or is it just the 100 operations per second in prod, 25 per second in nonprod?
There is no specific rate limit for individual endpoints. All endpoints share the same general rate limit, unless explicitly stated otherwise for particular endpoints.
ok, and that rate limit applies globally across all requests across all endpoints? E.G. 101 different parallel requests to 101 different endpoints would cause the 100 requests per second limit to be exceeded?
Yes, that's correct
No problem! Happy to help ๐