Skip to content

Remediate false transfer flips

POST
/admin/transfers/remediate-false-flips

Recovery surface for the #1126 bug class — ledger rows flipped out of held with no evidence money moved. Never calls stripe.transfers.create; money movement stays in the release machinery. Three modes:

  • detect — read-only classification of candidate rows. Optionally
    scoped to one userId.

  • execute — guarded ledger-only repair. Restores verified-stranded
    rows to held, backfills missing audit rows for rows whose transfer
    actually exists, and stamps donations.stripe_account_id for
    confirmed destination charges. Requires expectedCandidates and
    expectedRestoreCents from a prior detect run; any drift returns a
    409 mismatch.

  • attest — the operator personally vouches that money moved
    off-platform. Requires expectedCandidates, expectedRestoreCents,
    plus userId and reason (always per-creator and always reasoned).

Each candidate carries a classification: restore_to_held, already_transferred, direct_confirmed, subscription_excluded, skipped_concurrent, held_unproven, attested, or error. Requires manage_system_settings. Execute/attest are audit logged.

Authorizations

BearerAuth

Authentication is handled automatically via httpOnly session cookies after signing in at /cognito/signin or via Google SSO at /cognito/oauth/google. For Swagger UI testing, paste a JWT token from the /cognito/signin response.

Type
HTTP (bearer)

Request Body

application/json
JSON
{
"mode": "string",
"userId": "string",
"expectedCandidates": 0,
"expectedRestoreCents": 0,
"reason": "string"
}

Responses

Remediation result

application/json
JSON
{
"success": true,
"data": {
"mode": "string",
"candidates": [
{
"donationId": "string",
"classification": "string",
"netAmountCents": 0,
"stripeTransferId": "string",
"error": "string"
}
],
"counts": {
},
"restoreCandidates": 0,
"restoreCents": 0,
"attestCandidates": 0,
"attestCents": 0,
"restored": 0,
"restoredCents": 0,
"auditBackfilled": 0,
"directBackfilled": 0,
"attested": 0,
"attestedCents": 0
}
}

Playground

Server
Authorization
Body

Samples

Powered by VitePress OpenAPI

Built with VitePress