DEV Community

Small Tools Studio
Small Tools Studio

Posted on

Matching Shopify Orders to Stripe Payouts — the Algorithm and Tool

Shopify and Stripe operate on different accounting models. When reconciling orders to payouts, this mismatch creates real work:

Why the problem exists

  • Orders batch across multiple days; Stripe settles after 1–3 days
  • Fees are deducted directly from payouts, not shown as separate order line items
  • Refunds and chargebacks settle on a separate schedule (sometimes weeks later)
  • Your Stripe dashboard shows net payouts; Shopify orders show gross revenue

The matching algorithm

For each Shopify order, search for a matching Stripe payout using three criteria:

  1. Amount: Order total ±2% (covers Stripe fees and rounding errors)
  2. Date: Order date ±3 days (covers settlement delay)
  3. Memo: Order ID as substring in payout description

Unmatched orders are typically pending, held for review, or waiting for settlement. Unmatched payouts are usually refunds, chargebacks, or fee corrections.

Implementation

A browser-based tool runs this logic locally (no server, no API calls):

  • Upload Shopify orders CSV + Stripe payout CSV
  • Get three result categories: matched, unmatched orders, unmatched payouts
  • Export unmatched data for investigation

Usage

https://shopify-payout-recon.pages.dev/?src=devto_technical-11152130

The logic is simple enough to implement yourself, but a tool saves hours per payout cycle for stores reconciling 100+ orders monthly.

Top comments (0)