#Empress Brosephine
1 messages · Page 1 of 1 (latest)
yo hmunoz
hello. No, there are ways to make a request (potentially) faster by requesting fewer number of objects in each page and not using many expands
not sure I understand, can you rephrase?
yeah ...trying to word this in a way that makes sense lol
so we have a endpoint that generates a report of all transactions from the past 3 days
we are testing the following:
get the report
make a transaction
complete the payment
get the report again
but when we get the report again, it doesn't have the absolute latest charge in it
i've been trying to use setTimeouts etc to wait a bit but I can't get it to return the latest transaction; does Stripe use cache for its API calls?
actually wondering if this is a limit issue and not a speed issue
you'll have to share examples of the GETs, then the POSTs and then the following GET request again
can you try to repro and share the exact request IDs and the timestamps of when you kicked off each request?
yeah I can do that! I'll chat back in later since i'm away from my pc right now, but thank you for the help
the short answer is this is how i'm pulling in charges:
const charges = await stripe.charges.list({
created: {
gte: `${sevenDaysAgo}`
},
expand: ['data.balance_transaction'],
limit: 100
})
sevenDaysAgo is a unix timestamp for 7 days ago
nvm, it was the limit 🙂 that solved it.
haha glad you solved it!