#harsh_api

1 messages ยท Page 1 of 1 (latest)

valid spireBOT
#

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

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

shut raptor
dry lava
#

okay i will try it.

dry lava
#

i did not get report as my expectetion

shut raptor
#

Great! Happy to help!

dry lava
#

yes

shut raptor
#

Metadata should be included in the report API.

dry lava
#

above as you given link working "stripe/stripe-php": "^10.0",

valid spireBOT
wet lily
#

hi! I'm taking over this thread.

#

what's your question?

dry lava
#

I want to create same as stripe balance sammary report using api
https://dashboard.stripe.com/test/reports/balance?startDate=2024-12-16&endDate=2024-12-17&currency=usd&templateType=merchant&timezone=Etc%2FUTC

i have use this api $response = \Stripe\BalanceTransaction::all($params);
but i get differense in balance sammary report and api report , few amount count is missing.
i thing, is there any bug in stripe balance sammary report or in API \Stripe\BalanceTransaction::all($params);

$response = \Stripe\BalanceTransaction::all($params);
$all_transactions = array_merge($all_transactions, $response->data);

            $has_more = $response->has_more;
            if ($has_more) {
                $starting_after = end($response->data)->id;
            }
wet lily
#

I want to create same as stripe balance sammary report
why not directly use the balance summary report?

dry lava
#

base on mata-data i need to my project platform wise separate data.

wet lily
#

I don't understand, sorry.

#

can you explain with more details the issue?

dry lava
#

in my stripe account, i do get transactions for my multiple platforms.
from that based on meta-data I need to create platform wise separate balance summary report.

wet lily
dry lava
#

yes, already I use that endpoint. but i did not get right data.

#

its miss match with stripe balance summary report.

wet lily
#

can you clarify exactly what is the issue with this endpoint? which data is "not right"?

valid spireBOT
dry lava
#

yes

#

in stripe
https://dashboard.stripe.com/test/reports/balance?startDate=2024-12-16&endDate=2024-12-17&currency=usd&templateType=merchant&timezone=Etc%2FUTC
base on filter bellow data get.
Charges:309 (count 7 )
Fees:11.07
Refunds:-2300 (count 8 )
transfer:-660.19 (count 17 )
Total:-2655.19

use this endpoint: https://docs.stripe.com/api/balance_transactions/list
bellow data I get with same date.
\Stripe\BalanceTransaction::all($params);

Charges:304 (count 5 )
Fees:10.32
Refunds:-2299 (count 7 )
transfer:-660.19 (count 17)
Total:-2655.19

tropic snow
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

dry lava
#

in stripe
https://dashboard.stripe.com/test/reports/balance?startDate=2024-12-16&endDate=2024-12-17&currency=usd&templateType=merchant&timezone=Etc%2FUTC
base on filter bellow data get.
Charges:309 (count 7 )
Fees:11.07
Refunds:-2300 (count 8 )
transfer:-660.19 (count 17 )
Total:-2655.19

use this endpoint: https://docs.stripe.com/api/balance_transactions/list
bellow data I get with same date.
\Stripe\BalanceTransaction::all($params);

Charges:304 (count 5 )
Fees:10.32
Refunds:-2299 (count 7 )
transfer:-660.19 (count 17)
Total:-2655.19

#

I want to create same as stripe balance sammary report using api
https://dashboard.stripe.com/test/reports/balance?startDate=2024-12-16&endDate=2024-12-17&currency=usd&templateType=merchant&timezone=Etc%2FUTC

i have use this api $response = \Stripe\BalanceTransaction::all($params);
but i get differense in balance sammary report and api report , few amount count is missing.
i thing, is there any bug in stripe balance sammary report or in API \Stripe\BalanceTransaction::all($params);

$response = \Stripe\BalanceTransaction::all($params);
$all_transactions = array_merge($all_transactions, $response->data);

            $has_more = $response->has_more;
            if ($has_more) {
                $starting_after = end($response->data)->id;
            }
tropic snow
dry lava
#

i use $response = \Stripe\BalanceTransaction::all($params);

#

date wide data

#

so how to get Request ID req_xxx?

dry lava
#

req_0vtiFPpBbVEqig

#

req_spDzro0Eguhy3Q

tropic snow
#

Due to timezone issues the timeframe in the Dashboard and the API request might be slightly different, which results in more Charges in the Dashboard. But I don't think the data is incorrect in any case.

#

Feel free to compare the IDs you get from each result.

dry lava
#

in stripe
https://dashboard.stripe.com/test/reports/balance?startDate=2024-12-16&endDate=2024-12-17&currency=usd&templateType=merchant&timezone=Etc%2FUTC
base on filter bellow data get.
Charges:309 (count 7 )
Fees:11.07
Refunds:-2300 (count 8 )
transfer:-660.19 (count 17 )
Total:-2655.19

use this endpoint: https://docs.stripe.com/api/balance_transactions/list
bellow data I get with same date.
\Stripe\BalanceTransaction::all($params);

Charges:304 (count 5 )
Fees:10.32
Refunds:-2299 (count 7 )
transfer:-660.19 (count 17)
Total:-2655.19

#

ALSO i use UTC timezone.

tropic snow
#
created: {
    gte: "1734310800",
    lte: "1734440399",
  },

gte is 2024-12-16 01:00:00 not 00:00

#

And lte is 12:59:59, while in the Dashboard it's probably 23:59

dry lava
tropic snow
#

It must include metadata already, is it not the case?

dry lava
tropic snow
dry lava
#

Charges, refund and transfer

valid spireBOT
rich island
#

Then you need to expand the source field on the Balance Transaction to get the related field(s)