Skip to main content

Stripe Integration Install Walkthrough

Step-by-step Stripe accounting integration install for ERPClaw. From fresh Stripe account to first synced charge in under 5 minutes. Free, open source, ASC 606 ready.

This guide takes you from a fresh Stripe account to your first synced charge with proper journal entries. Most SaaS founders finish in under five minutes.

Prerequisites

You need three things: a Stripe account where you have at least read-only access to the Dashboard, a computer or small server where ERPClaw will run, and basic terminal access on that machine.

If you have not installed ERPClaw yet, see the ERPClaw install guide first.

We strongly recommend a restricted API key rather than a secret key. ERPClaw needs read access to the following resources:

  • Charges, refunds, disputes (read)
  • Payouts (read)
  • Customers (read)
  • Subscriptions, invoices (read)
  • Connect: Application fees, transfers (read; only if using Connect)
  • Webhook endpoints (write; for the webhook setup)

In the Stripe Dashboard, go to Developers > API Keys > Create restricted key. Name it erpclaw-readonly. Set the permission matrix to read-only on the resources above. Save and copy the rk_live_xxxxxxxxxxxxxxxx token.

For testing, use a rk_test_xxxxx key from your test mode.

2. Add the Stripe account to ERPClaw

erpclaw stripe-add-account \
  --company-id 1 \
  --account-name "Acme SaaS" \
  --api-key rk_live_xxxxxxxxxxxxxxxx

ERPClaw verifies the key works by fetching your Stripe account info, then creates the 12 GL accounts for Stripe (clearing, revenue, fees, refund, chargeback, chargeback_fee, deferred_revenue, application_fee, connect_transfer, reserve, bank, dispute_reserve).

3. Run the first sync

erpclaw stripe-start-full-sync --account-id <id-from-step-2>

ERPClaw pulls customers, charges, refunds, disputes, payouts, and subscriptions in order. A small SaaS finishes in seconds. A larger account with hundreds of thousands of transactions can take a few minutes.

4. Verify GL entries

Check that journal entries are posting:

erpclaw stripe-list-charges --account-id <id> --limit 5
erpclaw stripe-list-payouts --account-id <id>
erpclaw stripe-clearing-balance --account-id <id>

The clearing balance should be very close to your in-flight Stripe balance (charges that have not yet been paid out). If it matches within rounding, your books are correct.

For real-time sync, register an endpoint:

erpclaw stripe-register-webhook --account-id <id>

This creates a Stripe webhook endpoint pointing at your ERPClaw’s webhook receiver. Whenever Stripe fires an event (new charge, refund, dispute, etc.), your ERPClaw posts the journal entries within seconds.

If you cannot expose your ERPClaw to the public internet, skip this step and rely on the polling sync (stripe-start-full-sync on a cron).

6. Configure ASC 606 revenue recognition (SaaS only)

If you sell subscriptions, you almost certainly need ASC 606 treatment. Enable it:

erpclaw stripe-configure-asc606 --account-id <id> --enabled

ERPClaw will:

  • Post subscription payments to Deferred Revenue instead of Revenue
  • Recognize a portion of revenue every month over the subscription period
  • Handle mid-cycle changes (upgrades, downgrades, refunds) correctly

See ASC 606 reference for the details.

7. Configure Connect (platforms only)

If you run a marketplace on Stripe Connect:

erpclaw stripe-configure-connect --account-id <id> --pattern direct

Patterns: direct (direct charges with application_fee), destination (destination charges), or separate (separate charges and transfers). See Connect platform fees for the accounting treatment.

Where your data lives

Your charges, customers, payouts, and general ledger live in a SQLite database at ~/.openclaw/erpclaw/data.sqlite on your own machine. Back it up like any other file. AvanSaber never sees this data.

Next steps

Source code: github.com/avansaber/erpclaw-addons