#duran_balancetransactions-metadata
1 messages ยท Page 1 of 1 (latest)
๐ 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.
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?
@hallow dagger checking to see if you had more context to share?
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
for example I have used: https://api.stripe.com/v1/balance_transactions/
and that also doesn't acquire the order ID etc
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?
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
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?
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
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)
Can you copy/paste that txn_ id here?
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
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]?
I don't know which of those map to the transaction you shared.
Sorry, these screenshots mostly aren't helpful to me.
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
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)
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
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.
right
I'm deleting the report as it seems to contain live payment details.
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?
I am trying to look at previous transactions metadata
Payment Intents are already being created as part of your integration.
Oh, you're using a third-party integration?
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
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
if I use the endpoint https://api.stripe.com/v1/payment_intents , it doesn't provide any metadata
the metadata response is {}
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
Yes, however I have searched all of those endpoints, charge, refund, dispute, payout and none contain metadata
no matter the endpoint: https://api.stripe.com/v1/charges
metadata: {}
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
perfect. So call the Retrieve BalanceTransaction API https://docs.stripe.com/api/balance_transactions/retrieve in PHP and dump it. What do you see in the source property?
it is saying no such transaction exists
$test = $stripe->balanceTransactions->retrieve('txn_3OegFeJsnNKNYIVM03Wiuv8Q', []);
'No such balance transaction'
I mean if it tells you this you are looking on the wrong Stripe account or using the wrong API key
"source": "po_1Osy6uI947krWjuwJ9182d8K"
No that is not correct, that Payout has a completely different BalanceTransaction id on a completely different account
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
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.
ok
Please retrieve that exact BalanceTransaction on the right account and dump source so I can help you
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
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