#logonoff
1 messages ยท Page 1 of 1 (latest)
Hi ๐
What I would do is listen for the transfer.created event and, if the balance_transaction property is populated, query the Balance Transactions API
https://stripe.com/docs/api/balance_transactions/retrieve
The balance transaction object will include the available_on property. This is the closest we get to providing information on when funds are dispersed to banks
/cc @latent vigil
so the thing we wanna clarify is, in order to resolve from a payout to the original transfer, it is payout -> balance_transaction but the balance_transaction itself doesn't link to the original transfer. How do we resolve from balance_transaction to the transfer?
Actually you would listen to the payout.paid event, And then find both the transfer and the balance transactions from their relationship to the Payout object.
hmm we don't see transfer anywhere in the event data ๐ฆ
{
"object": {
"id": "po_1ME0pWEPfvmnS5SLBAK5j44F",
"object": "payout",
"amount": 4278,
"arrival_date": 1670803200,
"automatic": true,
"balance_transaction": "txn_1ME0pWEPfvmnS5SLfEYzNBzX",
"created": 1670808558,
"currency": "usd",
"description": "STRIPE PAYOUT",
"destination": "ba_1MC67IEPfvmnS5SLO4IxlIkx",
"failure_balance_transaction": null,
"failure_code": null,
"failure_message": null,
"livemode": false,
"metadata": {
},
"method": "standard",
"original_payout": null,
"reversed_by": null,
"source_type": "card",
"statement_descriptor": null,
"status": "paid",
"type": "bank_account"
}
}
and the balance_transaction just links to the payout only above
{
"id": "txn_1ME0pWEPfvmnS5SLfEYzNBzX",
"object": "balance_transaction",
"amount": -4278,
"available_on": 1670889600,
"created": 1670808558,
"currency": "usd",
"description": "STRIPE PAYOUT",
"exchange_rate": null,
"fee": 0,
"fee_details": [],
"net": -4278,
"reporting_category": "payout",
"source": "po_1ME0pWEPfvmnS5SLBAK5j44F",
"status": "pending",
"type": "payout"
}
Sorry for the delay, it's been crazy busy for a sec
You would find all the balance transactions associated with the Payout object using the List API and providing the payout ID: https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout
This would find whether the transfer was included. And you would retrieve the balance_transaction from the payout to see when the funds are available in the Connect Accounts Stripe balance