#morteza_34604
1 messages ยท Page 1 of 1 (latest)
Hi ๐ do you have a question?
hi
hope you are doing great
I'm developing an expense management app
- I need to show card balance, if possible
- also most like authorizations, transactions api
return only max of 100 records, return only max of 100 records, how can I return all records
- apply filter on them, too
- when user make a payment, transactions list doesn't update ASAP and takes about 24 hrs, how can I show if it's in pending state or complete, etc.
@keen elk
- Is that a question? What type of card are you talking about? (Spoiler, you can't get card balances)
- You can't, the API maxes out at 100 objects at a time, you will need multiple requests to retrieve them all. The auto-pagination we've built into our libraries should make that easy though:
https://stripe.com/docs/api/pagination/auto - I'm going to need more context
- Not sure what you're referring to, I'll need more context
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
about number 4, imagine a user that we have issued an issuing card for him, he uses our app which is an expense management, he expects to see the transaction ASAP in the app, when he makes a payment, but transaction is returned in api in 24 hours
about 1, I'm talking about stripe issuing card
Oh oh oh, this is about Stripe Issuing?
๐ stepping in here
Do you have an example of a transaction not returned from the API until 24 hours later?
It should be ~instant
How are you retrieving that data exactly?
well
let me send you the api
await stripe.issuing.transactions
.list(
{ card: cardId, limit: 100 },
{
stripeAccount: accountId,
},
)
I call this in my nextjs app backend
Okay yeah that API doesn't have any delay.
So will need more details really in what you are doing and a specific example
api is ok. but when I get tranasactions, the transacttion I make appears in the list after some hours, maybe 5-6 hours
You mean the response from the List Issuing Transactions API?
Have you attempted to just do an isolated test? Create an isolated test transaction on a fresh account with no other data on it and then list Transactions for that account?
no, I have tested with live keys , api doesn't have delays
I mean
transaction doesn't show up in api response immediately
maybe after some hours like 5-6
for example I made a purchase, and I didn't see transaction for that payment untill 6 hours
Do you have that tranasaction ID?
no
Okay well then I can't really help you any further. My recommendation is to test in test mode. The API should return created objects ~instantly.
There should not be a delay
So without a specific example to look at we are at an impasse
no, I mean array of objects returned by api, doesn't contain the transactions
Immediately
ok forget it, can I show card balance for issuing cards ?
Issuing cards don't have a balance directly. An Account has an Issuing balance holistically (https://stripe.com/docs/api/balance/balance_object#balance_object-issuing). You can retrieve an Account's balance using https://stripe.com/docs/api/balance/balance_retrieve to show that balance.
thanks
Sure
and I can't get all transactions at once
right ?
auto pagination must be used ?
also custome filtering must be implemented by our backend ?
after getting all transactions ?
Correct. Our List APIs have a max limit of 100. So you have to paginate to retrieve more results.
You can filter via the API based on the List paramters. Otherwise you need to implement that
and can I subtract authorization object amount from the spending limit to get card balance ?
Yes if you are setting an all_time limit that would work fine