#warhost_best-practices
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/1313545712729854002
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- warhost_best-practices, 20 hours ago, 6 messages
- warhost_code, 4 days ago, 8 messages
- warhost_error, 4 days ago, 13 messages
- warhost_unexpected, 5 days ago, 21 messages
Hey there, you can access those details for automatic payouts by starting from Balance Transactions, following the exmaple here:
curl https://api.stripe.com/v1/balance_transactions \
-u sk_test_123: \
-d payout=po_4242 \
-d type=charge \
-d "expand[]"="data.source" \
-G
Hmm I'm not sure I'm following. I have the dashboard open for the payout "po_1QQf6TQHZ2cyZE3nQhK12CZ2". There is a transaction list on that view. But even when expanding as you said, I don't see how I can build that view my self because I can't find the Transactions in that response.
Hello! I'm taking over and catching up...
Hei @vagrant harbor ๐ nice to meet you
When you got the response from the API you're not seeing the Charges in the response, under data?
{
"id": "txn_1QQf6TQHZ2cyZE3nYxUBCZBZ",
"object": "balance_transaction",
"amount": -60885,
"available_on": 1733356800,
"created": 1732928649,
"currency": "eur",
"description": "STRIPE PAYOUT",
"exchange_rate": null,
"fee": 0,
"fee_details": [],
"net": -60885,
"reporting_category": "payout",
"source": {
"id": "po_1QQf6TQHZ2cyZE3nQhK12CZ2",
"object": "payout",
"amount": 60885,
"application_fee": null,
"application_fee_amount": null,
"arrival_date": 1733097600,
"automatic": true,
"balance_transaction": "txn_1QQf6TQHZ2cyZE3nYxUBCZBZ",
"created": 1732928649,
"currency": "eur",
"description": "STRIPE PAYOUT",
"destination": "ba_1QPp3FQHZ2cyZE3nJnYfF7nQ",
"failure_balance_transaction": null,
"failure_code": null,
"failure_message": null,
"livemode": false,
"metadata": {},
"method": "standard",
"original_payout": null,
"reconciliation_status": "completed",
"reversed_by": null,
"source_type": "card",
"statement_descriptor": null,
"status": "paid",
"trace_id": {
"status": "supported",
"value": "7UF6L35Pl6o25c94ok3M38544bj7LV6wd3H84U60o"
},
"type": "bank_account"
},
"status": "pending",
"type": "payout"
},
curl --location --request GET 'https://api.stripe.com/v1/balance_transactions'
--header 'Stripe-Account: acct_XXX'
--header 'Authorization: Bearer sk_test_XXX'
--header 'Content-Type: application/x-www-form-urlencoded'
--data-urlencode 'expand[]=data.source'
Ah, so you didn't make the correct request. You need to specify the payout, type, and expand parameters when making that request. You only specified expand in that request.
Have a look at the code snippet here: https://docs.stripe.com/expand/use-cases#charges-in-payout
Ahh I think I get it now. If I omit type then I should get everything you show under "Transactions" on that view.
(Using the dashboard in German, not sure if it's also called Transactions in English)
No, you don't want to omit type, you want to set type to charge so you get all the Charges for the specified Payout.
Not sure yet. If I do set it, only 1 result is returned for po_1QQf6TQHZ2cyZE3nQhK12CZ2
What I need is basically for my customer to view all Payments/Application Fees that are part of a payout.
Can you share the curl request for your latest attempt with your API key redacted?
curl --location --request GET 'https://api.stripe.com/v1/balance_transactions'
--header 'Stripe-Account: acct_1QPow6QHZ2cyZE3n'
--header 'Authorization: Bearer sk_test_xxx
--header 'Content-Type: application/x-www-form-urlencoded'
--data-urlencode 'expand[]=data.source'
--data-urlencode 'type=charge'
--data-urlencode 'payout=po_1QQf6TQHZ2cyZE3nQhK12CZ2'
--data-urlencode 'limit=100'
Yeah, that looks correct. You should have received up to 100 Balance Transactions in the response, and inside each of those Balance Transactions the source should be one of the Charges in the Payout.
type is a filter right? I would assume the same.
Ahh no of course. There is only 1 charge, the others are "payments"
source.id starts with py, yes
But that's good, that means I should be able to get all payments for a payout, and from those all application fee's