---
title: "Repair Stripe reconciliation from Stripe API"
method: POST
path: "/admin/billing/stripe/repair"
tags: ["Billing"]
---

# Repair Stripe reconciliation from Stripe API

`POST /admin/billing/stripe/repair`

## Request

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

Admin-only endpoint that scans unmatched or failed Stripe invoice and adjustment reconciliation candidates, retrieves the latest Stripe objects, and replays local snapshot and closed-ledger reconciliation. This is the only admin billing route that explicitly reads from Stripe.

## Query parameters

- `kind` 'invoice' | 'adjustment' | 'all'
- `limit` integer

## Headers

- `x-api-key` string, required

## Response `200`

Stripe repair summary

- BillingStripeRepairSummaryResponseDoc
  - `code` integer
  - `data` BillingStripeRepairSummaryDoc
    - `adjustment_repaired` integer
    - `errors` BillingStripeRepairErrorDoc[]
      - `candidate_kind` string
      - `error` string
      - `event_id` string
      - `invoice_id` string
      - `resource_id` string
    - `failed` integer
    - `invoice_repaired` integer
    - `scanned` integer
    - `skipped` integer
    - `succeeded` integer
  - `msg` string

## Other responses

- `400`: Invalid query parameters
- `401`: Authentication required
- `403`: Admin plan required
- `500`: Internal server error

---

[API](https://skmtc.dev/crawlora/apis/crawlora-api.md) · [All operations](https://skmtc.dev/crawlora/apis/crawlora-api/llms.txt) · [OpenAPI document](https://skmtc.dev/crawlora/apis/crawlora-api/revisions/afac9b012a27?raw)
