Unira

use_case · payout_settlement

Bank deposits to Stripe payouts

The bank shows one net deposit. Stripe shows a payout id, an arrival date, and the same net. The descriptor on the bank line is often only "STRIPE".

What breaks in practice

A payout is charges minus refunds, disputes, and fees. Matching the bank deposit to any single charge never ties. The payout often arrives on the next business day, so a same-day rule leaves both sides unmatched. A second deposit with no payout id, or a payout that never hit the bank, disappears into a spreadsheet filter.

Unira does not expand one payout into every underlying charge. This recipe pairs each net bank deposit with the Stripe payout row that shares its payout id. Charge-level detail stays in Stripe.

What Unira reconciles

Outputs and exceptions

Sample payload

POST /api/v1/datasets (bank)

{
  "name": "Bank deposits — Stripe payouts",
  "id_field": "bank_id",
  "idempotency_key": "stripe-payouts-bank-v1",
  "records": [
    {"bank_id": "BANK-100", "date": "2026-10-08", "amount": "1842.15", "reference": "po_1842", "currency": "USD", "description": "STRIPE PAYOUT"},
    {"bank_id": "BANK-101", "date": "2026-10-15", "amount": "960.00", "reference": "po_960", "currency": "USD", "description": "STRIPE PAYOUT"},
    {"bank_id": "BANK-102", "date": "2026-10-20", "amount": "50.00", "reference": "po_unknown", "currency": "USD", "description": "STRIPE PAYOUT"}
  ]
}

POST /api/v1/datasets (Stripe)

{
  "name": "Stripe payouts",
  "id_field": "payout_id",
  "idempotency_key": "stripe-payouts-stripe-v1",
  "records": [
    {"payout_id": "po_1842", "posting_date": "2026-10-08", "amount": "1842.15", "reference": "po_1842", "currency": "USD"},
    {"payout_id": "po_960", "posting_date": "2026-10-16", "amount": "960.00", "reference": "po_960", "currency": "USD"},
    {"payout_id": "po_missing", "posting_date": "2026-10-22", "amount": "120.00", "reference": "po_missing", "currency": "USD"}
  ]
}

POST /api/v1/rulesets

{
  "name": "Stripe payout id to bank deposit",
  "rules": [
    {
      "id": "payout-exact",
      "name": "Same payout reference and currency; arrival within 3 days",
      "priority": 1,
      "conditions": [
        {"field_a": "currency", "field_b": "currency", "operator": "exact"},
        {"field_a": "reference", "field_b": "reference", "operator": "exact", "trim": true, "ignore_case": true},
        {"field_a": "amount", "field_b": "amount", "operator": "amount", "tolerance": "0"},
        {"field_a": "date", "field_b": "posting_date", "operator": "date", "tolerance": "3"}
      ]
    }
  ]
}

POST /api/v1/reconciliations

{
  "name": "October Stripe payouts",
  "use_case": "payout_settlement",
  "dataset_a_id": "ds_bank",
  "dataset_b_id": "ds_stripe",
  "ruleset_id": "rules_example",
  "ruleset_version": 1,
  "idempotency_key": "stripe-payouts-2026-10"
}

curl

curl --fail-with-body -sS https://unira.dev/api/v1/datasets \
  -H "Authorization: Bearer $UNIRA_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"name":"Bank deposits — Stripe payouts","id_field":"bank_id","idempotency_key":"stripe-payouts-bank-v1","records":[{"bank_id":"BANK-100","date":"2026-10-08","amount":"1842.15","reference":"po_1842","currency":"USD","description":"STRIPE PAYOUT"},{"bank_id":"BANK-101","date":"2026-10-15","amount":"960.00","reference":"po_960","currency":"USD","description":"STRIPE PAYOUT"},{"bank_id":"BANK-102","date":"2026-10-20","amount":"50.00","reference":"po_unknown","currency":"USD","description":"STRIPE PAYOUT"}]}'

curl --fail-with-body -sS https://unira.dev/api/v1/datasets \
  -H "Authorization: Bearer $UNIRA_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"name":"Stripe payouts","id_field":"payout_id","idempotency_key":"stripe-payouts-stripe-v1","records":[{"payout_id":"po_1842","posting_date":"2026-10-08","amount":"1842.15","reference":"po_1842","currency":"USD"},{"payout_id":"po_960","posting_date":"2026-10-16","amount":"960.00","reference":"po_960","currency":"USD"},{"payout_id":"po_missing","posting_date":"2026-10-22","amount":"120.00","reference":"po_missing","currency":"USD"}]}'

curl --fail-with-body -sS https://unira.dev/api/v1/rulesets \
  -H "Authorization: Bearer $UNIRA_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"name":"Stripe payout id to bank deposit","rules":[{"id":"payout-exact","name":"Same payout reference and currency; arrival within 3 days","priority":1,"conditions":[{"field_a":"currency","field_b":"currency","operator":"exact"},{"field_a":"reference","field_b":"reference","operator":"exact","trim":true,"ignore_case":true},{"field_a":"amount","field_b":"amount","operator":"amount","tolerance":"0"},{"field_a":"date","field_b":"posting_date","operator":"date","tolerance":"3"}]}]}'

curl --fail-with-body -sS https://unira.dev/api/v1/reconciliations \
  -H "Authorization: Bearer $UNIRA_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"name":"October Stripe payouts","use_case":"payout_settlement","dataset_a_id":"'"$A"'","dataset_b_id":"'"$B"'","ruleset_id":"'"$RULESET"'","ruleset_version":1,"idempotency_key":"stripe-payouts-2026-10"}'

curl --fail-with-body -sS "https://unira.dev/api/v1/reconciliations/$JOB/exceptions" \
  -H "Authorization: Bearer $UNIRA_API_KEY"
curl --fail-with-body -sS "https://unira.dev/api/v1/reconciliations/$JOB/export?format=csv" \
  -H "Authorization: Bearer $UNIRA_API_KEY" --output stripe-payouts.csv

MCP: reconcile_files

reconcile_files reads reference, amount, currency, and date or posting_date. With preset bank-books the one-day lag on po_960 falls inside the preset's 4-day rule, and the two orphans stay unmatched. use_case labels the job payout_settlement. To enforce this page's 3-day ruleset instead, pass ruleset_id and omit preset.

curl --fail-with-body -sS https://unira.dev/api/mcp \
  -H "Authorization: Bearer $UNIRA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  --data '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"reconcile_files","arguments":{"side_a_csv":"bank_id,date,description,amount,reference,currency\nBANK-100,2026-10-08,STRIPE PAYOUT,1842.15,po_1842,USD\nBANK-101,2026-10-15,STRIPE PAYOUT,960.00,po_960,USD\nBANK-102,2026-10-20,STRIPE PAYOUT,50.00,po_unknown,USD\n","side_b_csv":"payout_id,posting_date,amount,reference,currency\npo_1842,2026-10-08,1842.15,po_1842,USD\npo_960,2026-10-16,960.00,po_960,USD\npo_missing,2026-10-22,120.00,po_missing,USD\n","side_a_name":"Bank deposits","side_b_name":"Stripe payouts","preset":"bank-books","use_case":"payout_settlement","idempotency_key":"stripe-payouts-mcp-v1"}}}'

Other registered tools for the same job are get_reconciliation, get_exceptions, and export_results. Arguments are listed in llms.txt.