Payment events and reconciliation Required
Reconcile every payout
Within 2 business days of each provider payout, match it to the transactions it contains, to your ledger and to the bank statement.
How to do it
The provider pays out the net of charges, fees, refunds, disputes and currency conversion. Fetch the payout's balance transactions from the API or the provider's report. Match each one to a ledger row by provider ID, and add fee and conversion rows where they are missing. The payout amount must equal the sum of its rows to the minor unit. Then match the payout to its bank statement line. Put unmatched items on a list that a person clears every week.
Example
async function reconcilePayout(payoutId) {
const payout = await stripe.payouts.retrieve(payoutId)
let matchedMinor = 0
for await (const txn of stripe.balanceTransactions.list({ payout: payoutId, limit: 100 })) {
if (txn.type === 'payout') continue
await ledger.ensureEntry({ providerId: txn.id, amountMinor: txn.net, currency: txn.currency, type: txn.type })
matchedMinor += txn.net
}
if (matchedMinor !== payout.amount) throw new Error(`Payout ${payoutId} is off by ${payout.amount - matchedMinor}`)
}
def reconcile_payout(payout_id: str) -> None:
payout = stripe.Payout.retrieve(payout_id)
matched_minor = 0
for txn in stripe.BalanceTransaction.list(payout=payout_id, limit=100).auto_paging_iter():
if txn.type == "payout":
continue
ledger.ensure_entry(provider_id=txn.id, amount_minor=txn.net, currency=txn.currency, type=txn.type)
matched_minor += txn.net
if matched_minor != payout.amount:
raise ReconciliationError(f"Payout {payout_id} is off by {payout.amount - matched_minor}")
How to check
The reconciliation job fails and alerts when a payout differs from the sum of its matched rows by one minor unit or more. It also alerts when any item stays unmatched for more than 7 days.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers payments playbook: https://agentwranglers.se/playbook/payments/payment-events-and-reconciliation/payout-reconciliation.