#remrem_balance-transactions
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/1220420597256028182
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello! If you list the Balance Transactions and expand 'data.source' you should see the charge/payment that generated that balance transaction and I belive that'll include your metadata. You can read more about metadata at https://docs.stripe.com/expand if you haven't worked with it yet
even with data.source it return me the same
{
id: 'txn_1OwnZkQsyM1cbkpxwg5eWYZO',
object: 'balance_transaction',
amount: -2300,
available_on: 1711035039,
created: 1711035039,
currency: 'gbp',
description: null,
exchange_rate: null,
fee: 0,
fee_details: [],
net: -2300,
reporting_category: 'transfer',
source: 'tr_1OwnZjQsyM1cbkpxyZp9aLJU',
status: 'available',
type: 'transfer'
}
You didn't expand it though - if you expanded it you'd see the full source object in your response
here is my code:
const result = await stripe.balanceTransactions.list({
type: "payment",
stripeAccount: "acct_1OqdV9QsyM1cbkpx",
expand: ["data.source"],
});
I checked the most recent List Balance Transactions requests on your account and they're still not passing in expand - are you sure you're running the code you just updated?
remrem_balance-transactions
yes, i am preatty sure that i've updated the code
Let me try it really quick on my end to make sure it's behaving as expected
Aha! Try this instead:
const result = await stripe.balanceTransactions.list({
type: "payment",
expand: ["data.source"],
},
{
stripeAccount: "acct_1OqdV9QsyM1cbkpx",
});
Now the source is expanded
"source": {
"id": "acct_1EvKWYJCb8GR4OWr",
"object": "account",
"application_icon": "https://files.stripe.com/links/MDB8YWNjdF8xRXZLV1lKQ2I4R1I0T1dyfGZsX2xpdmVfczd3MzNUQjhoZXBJeVZjNDc2ck1mOU8100tBPtfhMG",
"application_logo": "https://files.stripe.com/links/MDB8YWNjdF8xRXZLV1lKQ2I4R1I0T1dyfGZsX2xpdmVfUHlrWERObHZnOHNWbUN5UHN4d3ljbHNQ00kSBgpxQo",
"application_name": "By Rotation",
"application_url": "https://byrotation.com"
},
but it doesn't have any metadata or transfer_group
my bad, it seems like i do have it
Ah awesome! I was just about to ask if you had the transaction ID if you weren't seeing it
I have one more question. What would you recommend to create in order to take money from someone connected account. Create charge or create a transfer? I think charge make more sense
We talk about this at https://docs.stripe.com/connect/account-debits - there's a way to do it with both charges and transfers