#morteza_34604

1 messages ยท Page 1 of 1 (latest)

vale spadeBOT
keen elk
#

Hi ๐Ÿ‘‹ do you have a question?

rustic gust
#

hi

#

hope you are doing great

#

I'm developing an expense management app

#
  1. I need to show card balance, if possible
#
  1. also most like authorizations, transactions api
#

return only max of 100 records, return only max of 100 records, how can I return all records

#
  1. apply filter on them, too
#
  1. 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

keen elk
#
  1. Is that a question? What type of card are you talking about? (Spoiler, you can't get card balances)
  2. 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
  3. I'm going to need more context
  4. Not sure what you're referring to, I'll need more context
rustic gust
#

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

keen elk
#

Oh oh oh, this is about Stripe Issuing?

rustic gust
#

yes

#

yes

vale spadeBOT
tropic thunder
#

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

rustic gust
#

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

tropic thunder
#

Okay yeah that API doesn't have any delay.

#

So will need more details really in what you are doing and a specific example

rustic gust
#

api is ok. but when I get tranasactions, the transacttion I make appears in the list after some hours, maybe 5-6 hours

tropic thunder
#

Not sure what that means

#

What list?

rustic gust
#

transactions list

#

issuing transactions list

tropic thunder
#

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?

rustic gust
#

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

tropic thunder
#

Do you have that tranasaction ID?

rustic gust
#

no

tropic thunder
#

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

rustic gust
#

the point is

#

you think that api response takes time and has delay ??

tropic thunder
#

No

#

It does not

rustic gust
#

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 ?

tropic thunder
rustic gust
#

thanks

tropic thunder
#

Sure

rustic gust
#

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 ?

tropic thunder
#

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

rustic gust
#

and can I subtract authorization object amount from the spending limit to get card balance ?

tropic thunder
#

Yes if you are setting an all_time limit that would work fine

rustic gust
#

and if the limits is monthly then I should subtract only the last month and etc. right ?

#

ok

#

thanks

#

for your help Bismarck