{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/lightspark/main/json-schema/lightspark-sandbox-card-clearing-request-schema.json",
  "title": "SandboxCardClearingRequest",
  "description": "Sandbox-only request body for `POST /sandbox/cards/{id}/simulate/clearing`. Drives a clearing event against an existing `CardTransaction`. Pass an `amount` greater than the authorized amount to exercise the over-auth / restaurant-tip post-hoc-pull path; pass `0` to exercise `AUTHORIZATION_EXPIRY`. Suffix-driven outcomes on the parent transaction's id govern whether the post-hoc pull succeeds.",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lightspark-sandbox-api-openapi.yml#/components/schemas/SandboxCardClearingRequest",
  "type": "object",
  "required": [
    "cardTransactionId",
    "amount"
  ],
  "properties": {
    "cardTransactionId": {
      "type": "string",
      "description": "The id of the `CardTransaction` to clear against. Must be in `AUTHORIZED` or `PARTIALLY_SETTLED` state."
    },
    "amount": {
      "type": "integer",
      "format": "int64",
      "description": "Clearing amount in the smallest unit of the transaction's currency. Set to `0` to simulate an authorization expiry with no clearing.",
      "minimum": 0
    }
  }
}