Billing

List Stripe invoice snapshots

Admin-only endpoint that lists local Stripe invoice snapshots with optional filters for time window, plan, invoice status, customer, user, period key, invoice id, and mismatch state. Without an explicit time range, the list defaults to the last 30 days.

get/admin/billing/stripe/invoices

Request

  • Base URL: https://api.crawlora.net/api/v1
  • URL: https://api.crawlora.net/api/v1/admin/billing/stripe/invoices
  • Auth: API key in header x-api-key

Query parameters

fromstring

Updated-at lower bound in RFC3339 format

tostring

Updated-at upper bound in RFC3339 format

plan'Free' | 'Starter' | 'Growth' | 'Pro' | 'Business' | 'Enterprise' | 'Admin'

Billing plan

statusstring

Stripe invoice status

customer_idstring

Stripe customer id

user_idstring

Matched user id

period_keystring

Matched billing period key in YYYY-MM format

invoice_idstring

Stripe invoice id

repair_status'pending' | 'running' | 'succeeded' | 'failed' | 'skipped'

Stripe repair status

mismatch_flagstring

Mismatch flag to filter

min_repair_attemptsinteger

Minimum repair attempts

needs_manual_reviewboolean

Filter snapshots with manual-review mismatch flags

has_mismatchboolean

Filter invoice snapshots that have expected-vs-actual mismatches

exclude_test_accountsboolean

Exclude sandbox accounts and Stripe test data

limitinteger

Maximum invoices to return. Defaults to 50 and clamps to 100.

Headers

x-api-keystring required

Admin API key required unless an Admin JWT is already present

Response

Stripe invoice snapshots

codeinteger
msgstring

Example response

{
  "code": 200,
  "data": [
    {
      "actual_overage_cents": 3200,
      "actual_subscription_cents": 7900,
      "amount_due_cents": 11100,
      "amount_paid_cents": 11100,
      "charge_id": "ch_123",
      "created_at": "2026-05-01T00:59:00Z",
      "currency": "usd",
      "due_date": "2026-05-08T00:00:00Z",
      "effective_due_date": "2026-05-08T00:00:00Z",
      "expected_total_cents": 11100,
      "finalized_at": "2026-05-01T01:00:00Z",
      "hosted_invoice_url": "https://invoice.stripe.com/i/acct_...",
      "invoice_pdf": "https://pay.stripe.com/invoice/.../pdf",
      "last_event_created": "2026-05-01T01:01:00Z",
      "last_event_id": "evt_123",
      "line_items": [
        {
          "amount_cents": 7900,
          "category": "subscription",
          "currency": "usd",
          "description": "Pro plan",
          "line_id": "il_123",
          "period_end": "2026-05-01T00:00:00Z",
          "period_start": "2026-04-01T00:00:00Z",
          "source_ref": "sub_123",
          "type": "subscription"
        }
      ],
      "matched_period_key": "2026-04",
      "matched_user_id": "user-1",
      "net_cash_cents": 11100,
      "paid_at": "2026-05-01T01:01:00Z",
      "payment_intent_id": "pi_123",
      "period_end": "2026-05-01T00:00:00Z",
      "period_start": "2026-04-01T00:00:00Z",
      "plan": "Pro",
      "reconciliation_status": "paid",
      "repair_attempts": 1,
      "repair_last_attempt_at": "2026-05-01T02:00:00Z",
      "repair_last_success_at": "2026-05-01T02:01:00Z",
      "repair_status": "pending",
      "stripe_customer_id": "cus_123",
      "stripe_invoice_id": "in_123",
      "stripe_invoice_number": "C8F8C2D-0001",
      "stripe_invoice_status": "paid",
      "subtotal_cents": 11100,
      "subtotal_excluding_tax_cents": 11100,
      "total_cents": 11100,
      "total_excluding_tax_cents": 11100,
      "updated_at": "2026-05-01T01:01:00Z"
    }
  ],
  "msg": "OK"
}

Changes

No recorded changes to this operation across all 2 revisions of this API.