Stripe connector · Signed webhooks · CSV backfill

Connect Stripe to Net Amount

Stream paid Stripe invoices, Checkout Sessions, credit notes, and refunded charges into Net Amount's transaction ledger automatically. Every synced USD transaction feeds live economic nexus monitoring, jurisdiction filing reports, and return snapshots.

1. Create a Stripe connection

Open /dashboard/integrations or call POST /integrations/connections with provider: "stripe" to get your unique webhook URL (https://netamount.com/api/integrations/webhook/{connectionId}). Register that URL in Stripe Webhooks, copy Stripe's signing secret (whsec_...), and save it in Net Amount using webhookSecret on create or PATCH /integrations/connections/{connectionId}.

Set syncMode: "dry_run" to verify test-mode or live payloads without writing to your ledger, then switch to "commit" for live production events (test-mode events are automatically skipped on live commit connections).

curl -X POST https://api.netamount.com/integrations/connections \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "stripe",
    "label": "Stripe US Production",
    "syncMode": "commit",
    "webhookSecret": "whsec_your_stripe_endpoint_secret"
  }'

Connection response (201 Created)

Net Amount stores your signing secret server-side to verify inbound Stripe-Signature headers and displays only the last 4 characters (webhookSecretLast4) in API and dashboard reads.

{
  "connection": {
    "connectionId": "conn_7a6b5c4d3e2f1a0b9c8d7e6f",
    "entityId": null,
    "provider": "stripe",
    "label": "Stripe US Production",
    "status": "active",
    "syncMode": "commit",
    "webhookSecretLast4": "cret",
    "ingestPath": "/api/integrations/webhook/conn_7a6b5c4d3e2f1a0b9c8d7e6f",
    "syncedCount": 0,
    "lastSyncedAt": null
  }
}

2. Subscribe Stripe webhooks or sync JSON

In Stripe Developers > Webhooks, add your Net Amount URL (https://netamount.com/api/integrations/webhook/{connectionId}), subscribe to invoice.paid, checkout.session.completed, credit_note.created, and charge.refunded, then copy the resulting whsec_... signing secret into Net Amount. Invoice-backed checkouts deduplicate automatically, each refund ID on charge.refunded is tracked individually, and test-mode events are skipped on live commit connections.

To test or replay Stripe events directly over the REST API (up to 100 events per call), post them to POST /integrations/connections/{connectionId}/sync:

curl -X POST https://api.netamount.com/integrations/connections/conn_7a6b5c4d3e2f1a0b9c8d7e6f/sync \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "dryRun": true,
    "events": [
      {
        "type": "invoice.paid",
        "data": {
          "object": {
            "id": "in_1Qx92KLkdIwHu7ix",
            "currency": "usd",
            "created": 1764374400,
            "subtotal_excluding_tax": 10000,
            "tax": 750,
            "total": 10750,
            "customer": "cus_acme_001",
            "customer_address": { "state": "FL", "country": "US" }
          }
        }
      }
    ]
  }'

3. Backfill historical Stripe CSV exports

Upload historical Stripe CSV exports in /dashboard/transactions or call POST /transactions/import with preset: "stripe". Run with dryRun: true first to check every row before committing (up to 200 rows per batch).

curl -X POST https://api.netamount.com/transactions/import \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "format": "csv",
    "preset": "stripe",
    "dryRun": true,
    "csv": "id,Created (UTC),Currency,Subtotal,Tax,Status,Shipping Address State\nin_1001,2026-10-15 14:22:00,usd,100.00,7.50,paid,FL"
  }'

Supported Stripe events and deduplication

Only USD events with a valid US shipping or billing state are committed; non-USD or non-US events are cleanly skipped.

Stripe eventLedger typeIdempotent external IDMapping behavior
invoice.paidsalestripe:<invoice_id>Maps USD invoice subtotal, shipping cost, and tax cents using shipping or customer address US state.
checkout.session.completedsalestripe:<session_id>Maps USD Checkout Session amount_subtotal, total_details.amount_shipping, and amount_tax. Invoice-backed checkouts automatically deduplicate against invoice.paid using the invoice ID.
credit_note.createdrefundstripe_refund:<credit_note_id>Records a negative refund entry in exact integer cents for US credit notes.
charge.refundedrefundstripe_refund:<refund_id>Tracks each individual refund ID (re_...) from the charge's refunds list as a separate negative ledger entry so partial and multiple refunds never collide.

Idempotent deduplication

Every Stripe object maps to a deterministic externalId (stripe:<id> or stripe_refund:<id>) scoped to your workspace or entity. Replaying webhooks or overlapping a CSV backfill skips already-committed transactions automatically.

Filing-period lock protection

When a connection is scoped to a legal entity and a return period is marked filed, events whose transactionDate lands inside that locked period are reported as filing_period_locked instead of altering submitted return numbers.

Stripe integration questions

How does Net Amount verify Stripe webhooks?
Every webhook delivered to https://netamount.com/api/integrations/webhook/{connectionId} must include a valid Stripe-Signature header. Copy Stripe's endpoint signing secret (whsec_...) into Net Amount via webhookSecret (or Update provider secret in the dashboard). Net Amount stores the secret server-side for constant-time HMAC-SHA256 verification over the timestamp and raw request body with a 5-minute (300-second) replay window, and exposes only the last 4 characters in API and dashboard reads.
What happens if Stripe retries a webhook delivery or fires both Checkout and Invoice events?
Net Amount assigns deterministic external IDs (stripe:<id> for sales and stripe_refund:<id> for refunds). Invoice-backed Checkout Sessions automatically deduplicate against invoice.paid, and each refund inside charge.refunded is tracked by its individual refund ID. Duplicate deliveries return skipped_duplicate without double-counting sales or tax. Test-mode events (livemode: false) are skipped on live commit connections; use dry_run mode to validate test events.
How does filing-period lock protection work for Stripe events?
When a legal entity has marked a state return period as filed, Net Amount locks that date range. Any incoming Stripe webhook or manual sync whose transactionDate falls inside a locked period is reported as filing_period_locked and is not written to the closed period, keeping filed return totals intact.
How do I backfill historical Stripe orders before enabling webhooks?
Export your historical transactions from the Stripe Dashboard as CSV and upload the file in /dashboard/transactions, or submit it to POST https://api.netamount.com/transactions/import with format: "csv" and preset: "stripe". Run with dryRun: true first to validate up to 200 rows per batch before committing.

Ship exact US sales tax.Without the guesswork.

Create an account to run exact rate lookups, order tax calculations, and economic nexus checks from the dashboard or REST API.