#duran_balancetransactions-metadata

1 messages ยท Page 1 of 1 (latest)

vapid pumiceBOT
#

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

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

potent capeBOT
short atlas
#

Hi there ๐Ÿ‘‹ we aren't too familiar with prebuilt reports in this forum, is that where you're trying to include the metadata you're providing to us?

short atlas
#

@hallow dagger checking to see if you had more context to share?

hallow dagger
#

hello

#

yes

#

these are the reports that can be exported

#

I am trying to acquire that data through an endpoint and there are none that offer those metadata fields, unless you use expandable fields, which doesn't seem to find retroactive data

#

and that also doesn't acquire the order ID etc

short atlas
#

I don't know where those reports are pulling data from, do you know what objects you're putting your metadata on?

#

Do you have an idea if that is showing metadata that you provided, or are you getting the impression it may be pulling data from related objects? Do you have an example object we can look at?

hallow dagger
#

one moment

#

I am finding the report that it exports from

#

I am trying to use a Stripe endpoint to obtain those fields, the metadata ones

short atlas
#

I still don't know where those are coming from, so I don't know where to tell you to look.

#

Do you know what type of objects the report is returning, do they look like Balance Transactions? Is there a column that is just an ID that would help us know what type of objects we're looking for/at?

hallow dagger
#

yes...

#

using the stripe sdk in php, it's using the balancetransactions object

#

or, that is the object I've been using to try and get the metadata

short atlas
#

Do you have the ID of a Balance Transaction, I'm doubtful that's where the metadata is being stored (if this is metadata that you provided, which I'm still unsure about)

hallow dagger
short atlas
#

Can you copy/paste that txn_ id here?

hallow dagger
#

txn_3OpICiI947krWjuw1JYmzHuo

#

yes it's definitely not stored there, but that is the closest field I could get to what I need

#

reporting_category for example is a field I need, but that is provided in this endpoint

#

as is gross, description, etc

short atlas
#

I'm not seeing any metadata for that chain of objects, Balance Transaction, Charge, Payment Intent, or Invoice. I don't think that report is pulling from the metadata field (values you provide), but rather is pulling from related objects.

For the Balance Transaction you shared, what do you see in the report for payment_metadata[productName]?

hallow dagger
short atlas
#

I don't know which of those map to the transaction you shared.

hallow dagger
#

one moment

#

this is an itemized report:

short atlas
#

Sorry, these screenshots mostly aren't helpful to me.

hallow dagger
#

I don't think that csv will help either

#

Is there any way to retrieve the related fields through an endpoint? I don't know what maps to what, or what fields need to be passed into the API call

short atlas
#

I don't know, I still don't know what those fields are pulling from, so I don't know if they're available from the API. (We know nothing about these prebuilt reports)

hallow dagger
#

that's where I have been stuck as well. The API doesn't seem to indicate that you can obtain them because it never says what they are connected to

short atlas
#

Okay, this is metadata that you are providing. You're providing it on the Payment Intent, so that seems like the object in the chain you need to look at the metadata for.

hallow dagger
#

right

short atlas
#

I'm deleting the report as it seems to contain live payment details.

hallow dagger
#

yes thank you

#

yes but it says you need to create a payment intent first, then specify the field

#

but doesn't that mean it will only be callable for future payments that are made through stripe?

potent capeBOT
hallow dagger
#

I am trying to look at previous transactions metadata

short atlas
#

Payment Intents are already being created as part of your integration.

#

Oh, you're using a third-party integration?

hallow dagger
#

no

#

I am just using a local SDK for php

#

Stripe Client

harsh yacht
#

Okay so what exactly is the issue?

#

Please don't share pictures. Share exact end to end code with detailed information about what is confusing you

#

duran_balancetransactions-metadata

hallow dagger
#

Ok

#

Using this line in the SDK: $stripe->balanceTransactions->all();

#

How do I obtain the metadata fields specified in the reports?

#

for example: orderID, productName

#

those are apparently connected to payment intents, but I don't know how to grab that using the SDK

#

the metadata response is {}

harsh yacht
#

Gotcha, so what your code is doing is listing the BalanceTransactions. Those model all types of money movement in your Stripe account. Many different things can move money (a Charge, a Refund, a Dispute, a Payout, etc.). Each of those have their own completely separate API resource with information that you have to look at separately. The BalanceTransaction object has no metadata information at all

hallow dagger
#

Yes, however I have searched all of those endpoints, charge, refund, dispute, payout and none contain metadata

#

metadata: {}

harsh yacht
#

Sure, let's take one concrete example first then. Share one txn_12345 where you know you have metadata in the the Dashboard report. And then I'll show you where it lives

hallow dagger
#

ok one moment

#

whoops

#

one moment

#

txn_3OegFeJsnNKNYIVM03Wiuv8Q

harsh yacht
hallow dagger
#

it is saying no such transaction exists

#

$test = $stripe->balanceTransactions->retrieve('txn_3OegFeJsnNKNYIVM03Wiuv8Q', []);

#

'No such balance transaction'

harsh yacht
#

I mean if it tells you this you are looking on the wrong Stripe account or using the wrong API key

hallow dagger
#

"source": "po_1Osy6uI947krWjuwJ9182d8K"

harsh yacht
#

No that is not correct, that Payout has a completely different BalanceTransaction id on a completely different account

hallow dagger
#

yes this is for a different account, different API key. Dr. Talks I am logged into, but I am testing currently with CAS design group

#

I dumped the balance transactions

harsh yacht
#

Sure but I am trying to help you understand it all. So we need to focus on that exact BalanceTransaction id you shared and nothing else.

hallow dagger
#

ok

harsh yacht
#

Please retrieve that exact BalanceTransaction on the right account and dump source so I can help you

hallow dagger
#

Ah

#

I am logged into one of the 3 accounts I manage, Dr Talks...this does not give permission to view the API key, only to export the report

#

the API key I DO have is for a separate account

#

in order to stay on this, I will need to request permission for the API key

harsh yacht
#

yeah sorry it's crucial that you understand how all of your integration works

#

You are using Stripe Connect and you are making Direct Charges on a connected account

#

You likely have the API key of the platform and need to properly pass the connected account id acct_123 in the Stripe-Account header

hallow dagger
#

so it is best if I circle back, otherwise I can't pull accurate data

#

I will reach out tomorrow once I have more info, thank you for your time

#

and for the resource