# Stripe Payout-to-Bank Reconciliation (`afkdigital/stripe-payout-bank-reconciliation`) Actor

Reconcile Stripe payout CSVs with bank statements. Reference-first matching, ambiguity checks, refund/fee breakdown and safe JSON/CSV. File-only; no account connections. $0.01 per unique payout reviewed.

- **URL**: https://apify.com/afkdigital/stripe-payout-bank-reconciliation.md
- **Developed by:** [AFK Digital](https://apify.com/afkdigital) (community)
- **Categories:** Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 unique stripe payout revieweds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Stripe Payout-to-Bank Reconciliation

Match your Stripe payout export to your bank CSV without connecting a Stripe account or bank. Produce one auditable result per unique payout, with explicit ambiguity and an optional breakdown of payments, fees, refunds and other supplied balance transactions.

**Price: $0.01 per successfully reviewed unique Stripe payout ($10 per 1,000), per run.** A completed review is billable even when it is unmatched, ambiguous, has a reference mismatch or a currency mismatch. Bank rows, detail lines, identical duplicate payout records, downloads and summary records are not separate events. Platform usage is included. Invalid files fail before any payout event. A new run reviewing the same payout is a new review. No subscription or Stripe credentials required.

### Quick start

Run the prefilled synthetic example. It includes seven unique payouts: exact matching, a three-day bank delay, two same-amount candidates, a missing deposit, a refund breakdown, an EUR match and a currency mismatch. One identical duplicate payout demonstrates deduplication.

Use these inputs:

- `stripePayoutFile`: CSV with one row per payout.
- `bankStatementFile`: bank CSV with signed credits/debits.
- `optionalStripeTransactionsFile`: optional itemized Stripe payout reconciliation export.
- `columnMapping`: source header mapping.
- `dateToleranceDays`: 0–31 absolute calendar days, default 3.
- `amountTolerance`: exact decimal major units, default "0.01".
- `maxTransactions`: 1–10,000 unique payouts, default 1,000. Excess input fails; it is not silently truncated.

Each file is an object: `{"format":"csv","text":"header1,header2\nvalue1,value2"}`, `{"base64":"UTF8_CSV_BASE64"}` or `{"url":"https://api.apify.com/v2/key-value-stores/STORE_ID/records/bank.csv"}`. You can upload CSV bytes to your private Apify key-value store, then select that store under **fileStores** and provide its record URL. URLs may not contain query strings, redirects or external hosts. Files are read using the run's scoped Apify authorization. Inline files need no fileStores setting.

### CSV columns

All amounts are **signed major units** (97.00 USD means 97 dollars, not 97 cents). Bank deposits are positive; withdrawals and negative payouts are negative. Convert bank debit/credit columns into one signed amount column before running. Numeric grouping, scientific notation, currency symbols and decimal commas are rejected. Dot decimals support up to 12 integer digits and 6 decimal places with Decimal arithmetic; no binary floating point calculations or automatic rounding.

| File | Required columns | Optional columns |
|---|---|---|
| Payout | payout_id, payout_date, currency, amount | reference, status |
| Bank | posted_date, currency, amount | bank_row_id, reference |
| Details | transaction_id, payout_id, currency, gross, fee, net, type | — |

Payout IDs must begin with `po_`. Bank row IDs are generated from row numbers if omitted. Supplied bank row IDs must be unique. Headers are matched case-insensitively with spaces normalized. Common aliases include payout `id`, `arrival_date`, `Arrival Date (UTC)`; bank `date`, `description`, `memo`; details `balance_transaction_id`, `automatic_payout_id`, `reporting_category`.
Explicit mapping example:

```json
{"payout":{"payout_date":"Arrival Date (UTC)"},"bank":{"posted_date":"Booking Date","amount":"Signed Amount","reference":"Payment Reference"}}
```

The mapping direction is canonical field to exact source header. Dates must be YYYY-MM-DD or ISO timestamps. Aware timestamps are normalized to UTC dates; naive timestamps keep their date. Export both files in the same time zone, preferably UTC. Use the expected payout arrival date as payout_date. Calendar-day tolerance includes weekends and holidays.

### Matching rules and status

1. Find case-sensitive exact custom reference matches or an exact case-sensitive po\_ payout-ID token in the bank reference.
2. Reserve reference-associated bank rows before any fallback matching, even when a reference has the wrong currency, amount or date. A row referencing another po\_ ID is never used as an anonymous fallback.
3. Validate currency, signed amount difference and date range. References do not bypass these checks.
4. For payouts without reference evidence, consider same-currency bank rows within both tolerances.
5. Match only mutually unique candidates. Multiple plausible candidates or a bank row shared by payouts produce **ambiguous**. No first-row or nearest-date guessing; no bank row is assigned twice.

| match_status | Meaning |
|---|---|
| matched_reference | Unique reference, currency, amount and date match |
| matched_amount_date | Unique same-currency amount/date match |
| ambiguous | Multiple references/candidates or shared bank row |
| unmatched | No eligible bank row, or payout status is pending/in_transit/failed/canceled |
| reference_mismatch | Reference found but amount/date does not fit |
| currency_mismatch | Referenced bank record uses another currency |

Unconfirmed matches have null bank_row_id, bank_posted_date, received_amount and difference. candidate_count and match_reason explain the decision. Difference for a confirmed match is received minus expected. Lowercase currencies are normalized to uppercase. Different currencies are never definitely matched: this version accepts no exchange rate. A matched result is a file-based reconciliation finding, not proof of settlement or an accounting certification.

### Optional payout composition

Supply Stripe's itemized payout reconciliation CSV as optionalStripeTransactionsFile, alongside the separate payout summary export. We use only explicit payout IDs; we do not guess links for manual or instant payouts. Stripe's report is designed primarily for automatic payouts.

For each payout/currency, fee_summary reports gross_total, fee_total, net_total, transaction_count, by_type and difference_from_payout. Refunds/disputes retain their supplied sign. Each row must satisfy gross minus fee equals net. Identical transaction-ID duplicates collapse; conflicting duplicates fail validation. Payout, payout_cancel and payout_failure movement lines are excluded to avoid double subtraction. Cross-currency lines are excluded and counted. A sum that differs from the payout, or has foreign-currency detail lines, is marked incomplete_or_inconsistent. Missing details are not invented. Detail completeness is limited to the supplied files; a matching sum does not independently verify Stripe data.

### Outputs and export

The Dataset contains one row per delivered payout with payout_id, bank_row_id, payout_date, bank_posted_date, currency, expected_amount, received_amount, difference, fee_summary, match_status, match_reason and candidate_count. Money is returned as decimal strings.

Download Dataset JSON or CSV, or use the **RECONCILIATION.csv** key-value record for a stable, spreadsheet-safe CSV with fee_summary serialized as JSON. Dangerous leading spreadsheet characters in text identifiers are prefixed with an apostrophe; signed numeric amount fields remain numeric strings. Dataset identifiers are also protected. **RECONCILIATION** contains JSON. **SUMMARY** contains status counts, duplicate counts, unmatched payout IDs and bank row IDs, plus delivery/billing counts. Bank references, descriptions, account numbers and customer columns are not emitted. Unknown columns are ignored and are never logged.

### Limits, privacy and recovery

UTF-8 CSV only (comma or semicolon), at most 5 MiB per file, 100 columns, 2,048 characters per cell, 20,000 raw payout rows, 10,000 unique payouts, 30,000 bank rows and 50,000 detail rows. No XLSX, PDF, OCR, automatic split/merged bank deposits, FX, minor-unit conversion or live account connections. More than 200,000 candidate links are rejected before billing. Unknown payout status values and malformed optional file descriptors also fail validation. Invalid required dates/money, duplicate bank IDs and conflicting payout/detail IDs fail the whole validation before charging.

Uploaded data and outputs remain in your Apify run storage under your account access and retention settings. Delete runs/stores when no longer needed. Use opaque bank row IDs, not bank account numbers. The Actor logs only generic progress and validation locations, never CSV contents, bank account numbers, customer fields or file URLs. There are no external analytics or bank/Stripe calls.

The run's maximum charge limits delivered payouts in input order. SUMMARY distinguishes reviewed input from delivered payouts. If delivery is interrupted, existing results remain accessible; resurrection of an incomplete run stops safely instead of risking duplicate results/charges. Confirmed event counts and the in-flight payout are journaled after each event. An interrupted charge may be unconfirmed; check Apify run charging data for its final outcome. A completed run's resurrection is a no-op. Automatic restart is disabled. Review existing outputs before deliberately starting a new run.

### Versions and sources

Version 1.0.0. Python 3.13; Apify SDK 4.2.1 (Apache-2.0), HTTPX 0.28.1 (BSD-3-Clause); exact transitive versions are locked in requirements-lock.txt.

- [Stripe payout reconciliation report](https://docs.stripe.com/reports/payout-reconciliation)
- [Stripe payout reporting options](https://support.stripe.com/questions/payout-reporting-options)
- [Apify pay-per-event](https://docs.apify.com/actors/monetize/pay-per-event)

Independent tool by AFK Digital; not affiliated with Stripe.

# Actor input Schema

## `stripePayoutFile` (type: `object`):

CSV descriptor: {"text":"CSV contents"}, {"base64":"..."} or {"url":"https://api.apify.com/v2/key-value-stores/STORE/records/FILE.csv"}. UTF-8, 5 MiB max. Select fileStores for private uploads. See README for required columns.

## `bankStatementFile` (type: `object`):

CSV descriptor: {"text":"CSV contents"}, {"base64":"..."} or {"url":"https://api.apify.com/v2/key-value-stores/STORE/records/FILE.csv"}. UTF-8, 5 MiB max. Select fileStores for private uploads. See README for required columns.

## `optionalStripeTransactionsFile` (type: `object`):

CSV descriptor: {"text":"CSV contents"}, {"base64":"..."} or {"url":"https://api.apify.com/v2/key-value-stores/STORE/records/FILE.csv"}. UTF-8, 5 MiB max. Select fileStores for private uploads. See README for required columns.

## `columnMapping` (type: `object`):

Canonical-to-source headers grouped by payout, bank, transactions. Example: {"bank":{"posted_date":"Booking date","amount":"Credit"}}. Signed major units; no automatic debit/credit conversion.

## `dateToleranceDays` (type: `integer`):

Absolute calendar days from payout arrival date; includes weekends.

## `amountTolerance` (type: `string`):

Nonnegative decimal from 0 to 1000. Same tolerance in each currency; no FX or currency rounding is inferred.

## `maxTransactions` (type: `integer`):

Fails before billing if input contains more unique payout IDs. Identical duplicates do not count again.

## `fileStores` (type: `array`):

Select the KVS stores holding your CSV records when using URLs. No Stripe or bank login.

## Actor input object example

```json
{
  "stripePayoutFile": {
    "format": "csv",
    "text": "payout_id,payout_date,currency,amount,reference,status\npo_exact,2026-11-01,USD,97.00,REF-EXACT,paid\npo_delayed,2026-11-01,USD,150.00,REF-DELAY,paid\npo_ambiguous,2026-11-01,USD,200.00,,paid\npo_missing,2026-11-01,USD,333.00,,paid\npo_refund,2026-11-01,USD,77.00,REF-REFUND,paid\npo_eur,2026-11-01,EUR,50.00,REF-EUR,paid\npo_fx,2026-11-01,USD,80.00,REF-FX,paid\npo_exact,2026-11-01,USD,97.00,REF-EXACT,paid\n"
  },
  "bankStatementFile": {
    "format": "csv",
    "text": "bank_row_id,posted_date,currency,amount,reference\nbank_1,2026-11-01,USD,97.00,REF-EXACT\nbank_2,2026-11-04,USD,150.00,REF-DELAY\nbank_3,2026-11-01,USD,200.00,\nbank_4,2026-11-02,USD,200.00,\nbank_5,2026-11-02,USD,77.00,REF-REFUND\nbank_6,2026-11-02,EUR,50.00,REF-EUR\nbank_7,2026-11-01,EUR,80.00,REF-FX\n"
  },
  "optionalStripeTransactionsFile": {
    "format": "csv",
    "text": "balance_transaction_id,automatic_payout_id,currency,gross,fee,net,reporting_category\ntxn_1,po_exact,usd,100.00,3.00,97.00,charge\ntxn_2,po_refund,usd,100.00,3.00,97.00,charge\ntxn_3,po_refund,usd,-20.00,0.00,-20.00,refund\n"
  },
  "columnMapping": {},
  "dateToleranceDays": 3,
  "amountTolerance": "0.01",
  "maxTransactions": 1000
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `csv` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "stripePayoutFile": {
        "format": "csv",
        "text": "payout_id,payout_date,currency,amount,reference,status\npo_exact,2026-11-01,USD,97.00,REF-EXACT,paid\npo_delayed,2026-11-01,USD,150.00,REF-DELAY,paid\npo_ambiguous,2026-11-01,USD,200.00,,paid\npo_missing,2026-11-01,USD,333.00,,paid\npo_refund,2026-11-01,USD,77.00,REF-REFUND,paid\npo_eur,2026-11-01,EUR,50.00,REF-EUR,paid\npo_fx,2026-11-01,USD,80.00,REF-FX,paid\npo_exact,2026-11-01,USD,97.00,REF-EXACT,paid\n"
    },
    "bankStatementFile": {
        "format": "csv",
        "text": "bank_row_id,posted_date,currency,amount,reference\nbank_1,2026-11-01,USD,97.00,REF-EXACT\nbank_2,2026-11-04,USD,150.00,REF-DELAY\nbank_3,2026-11-01,USD,200.00,\nbank_4,2026-11-02,USD,200.00,\nbank_5,2026-11-02,USD,77.00,REF-REFUND\nbank_6,2026-11-02,EUR,50.00,REF-EUR\nbank_7,2026-11-01,EUR,80.00,REF-FX\n"
    },
    "optionalStripeTransactionsFile": {
        "format": "csv",
        "text": "balance_transaction_id,automatic_payout_id,currency,gross,fee,net,reporting_category\ntxn_1,po_exact,usd,100.00,3.00,97.00,charge\ntxn_2,po_refund,usd,100.00,3.00,97.00,charge\ntxn_3,po_refund,usd,-20.00,0.00,-20.00,refund\n"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("afkdigital/stripe-payout-bank-reconciliation").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "stripePayoutFile": {
        "format": "csv",
        "text": """payout_id,payout_date,currency,amount,reference,status
po_exact,2026-11-01,USD,97.00,REF-EXACT,paid
po_delayed,2026-11-01,USD,150.00,REF-DELAY,paid
po_ambiguous,2026-11-01,USD,200.00,,paid
po_missing,2026-11-01,USD,333.00,,paid
po_refund,2026-11-01,USD,77.00,REF-REFUND,paid
po_eur,2026-11-01,EUR,50.00,REF-EUR,paid
po_fx,2026-11-01,USD,80.00,REF-FX,paid
po_exact,2026-11-01,USD,97.00,REF-EXACT,paid
""",
    },
    "bankStatementFile": {
        "format": "csv",
        "text": """bank_row_id,posted_date,currency,amount,reference
bank_1,2026-11-01,USD,97.00,REF-EXACT
bank_2,2026-11-04,USD,150.00,REF-DELAY
bank_3,2026-11-01,USD,200.00,
bank_4,2026-11-02,USD,200.00,
bank_5,2026-11-02,USD,77.00,REF-REFUND
bank_6,2026-11-02,EUR,50.00,REF-EUR
bank_7,2026-11-01,EUR,80.00,REF-FX
""",
    },
    "optionalStripeTransactionsFile": {
        "format": "csv",
        "text": """balance_transaction_id,automatic_payout_id,currency,gross,fee,net,reporting_category
txn_1,po_exact,usd,100.00,3.00,97.00,charge
txn_2,po_refund,usd,100.00,3.00,97.00,charge
txn_3,po_refund,usd,-20.00,0.00,-20.00,refund
""",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("afkdigital/stripe-payout-bank-reconciliation").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "stripePayoutFile": {
    "format": "csv",
    "text": "payout_id,payout_date,currency,amount,reference,status\\npo_exact,2026-11-01,USD,97.00,REF-EXACT,paid\\npo_delayed,2026-11-01,USD,150.00,REF-DELAY,paid\\npo_ambiguous,2026-11-01,USD,200.00,,paid\\npo_missing,2026-11-01,USD,333.00,,paid\\npo_refund,2026-11-01,USD,77.00,REF-REFUND,paid\\npo_eur,2026-11-01,EUR,50.00,REF-EUR,paid\\npo_fx,2026-11-01,USD,80.00,REF-FX,paid\\npo_exact,2026-11-01,USD,97.00,REF-EXACT,paid\\n"
  },
  "bankStatementFile": {
    "format": "csv",
    "text": "bank_row_id,posted_date,currency,amount,reference\\nbank_1,2026-11-01,USD,97.00,REF-EXACT\\nbank_2,2026-11-04,USD,150.00,REF-DELAY\\nbank_3,2026-11-01,USD,200.00,\\nbank_4,2026-11-02,USD,200.00,\\nbank_5,2026-11-02,USD,77.00,REF-REFUND\\nbank_6,2026-11-02,EUR,50.00,REF-EUR\\nbank_7,2026-11-01,EUR,80.00,REF-FX\\n"
  },
  "optionalStripeTransactionsFile": {
    "format": "csv",
    "text": "balance_transaction_id,automatic_payout_id,currency,gross,fee,net,reporting_category\\ntxn_1,po_exact,usd,100.00,3.00,97.00,charge\\ntxn_2,po_refund,usd,100.00,3.00,97.00,charge\\ntxn_3,po_refund,usd,-20.00,0.00,-20.00,refund\\n"
  }
}' |
apify call afkdigital/stripe-payout-bank-reconciliation --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,afkdigital/stripe-payout-bank-reconciliation"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/J2ziJ1HPHefsEfXPE/builds/tXGvmRCEMBPcph5a1/openapi.json
