#churchlady_api
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/1346198038791716894
📝 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.
- churchlady_payout-reconciliation-failed-payouts, 1 hour ago, 18 messages
Before, we would only get balance transactions that have a type of "payments" like
$balanceTransactions = BalanceTransaction::all(
[
'payout' => $payout->id,
'type' => 'payment',
'expand' => ['data.source.source_transfer.source_transaction'],
],
[
'api_key' => Config::get('services.stripe.secret'),
'stripe_account' => $stripeAccountWithSettledPayments->stripe_connect_id,
]
);
It looks like we will also have to find failed payouts like this:
$balanceTransactions = BalanceTransaction::all(
[
'payout' => $payout->id,
'type' => 'payout_failure',
'expand' => ['data.source.source_transfer.source_transaction'],
],
[
'api_key' => Config::get('services.stripe.secret'),
'stripe_account' => $stripeAccountWithSettledPayments->stripe_connect_id,
]
);
Then from the balance transaction, I see that the source id is the failed payout.
I am not sure about the expand part
Hey there. I'm happy to assist. Give me a sec to wrap up an existing thread.
payout_failure is a valid Balance transaction type [0]
[0] https://docs.stripe.com/reports/balance-transaction-types#balance_related
I guess I may not be clear on your question.
I understand. But how do I get the dates and the credit card fees for the failed payouts?
For example, for successful payout, I do the following:
$balanceTransactions = BalanceTransaction::all(
[
'payout' => $payout->id,
'type' => 'payment',
'expand' => ['data.source.source_transfer.source_transaction'],
],
[
'api_key' => Config::get('services.stripe.secret'),
'stripe_account' => $stripeAccountWithSettledPayments->stripe_connect_id,
]
);
foreach ($balanceTransactions->autoPagingIterator() as $balanceTransaction) {
if ($balanceTransaction->source->source_transfer->source_transaction instanceof Charge) {
$charge = $balanceTransaction->source->source_transfer->source_transaction;
$balanceTransactionForCharge = BalanceTransaction::retrieve($charge->balance_transaction);
$paymentToUpdate = Payment::where('online_payment_trans_id', $charge->id)->first();
}
}
}
How do I get the same data (actual payout date and credit card fees) for charges that initially were associated with a failed payout?
I can provide a more detailed example if necessary.
Understood. This is going to need a deeper investigation, I'm going to trigger a flow that will have our bot send you a DM to create a support ticket that will come right to our team.
Okay
Hello @gritty meadow, we have sent you a direct message, please check it at https://discord.com/channels/@me/1346204314787647594
- 🔗The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.