{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/simpleeasytransactions-com/json-schema/simpleeasytransactions-com-payout-schema.json",
  "title": "Payout",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/simpleeasytransactions-com-openapi.json#/components/schemas/Payout",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "object": {
      "type": "string",
      "const": "payout"
    },
    "wallet": {
      "type": "string"
    },
    "recipient": {
      "type": "string"
    },
    "customer": {
      "type": "string"
    },
    "batch": {
      "description": "null in the example; holds a value when set."
    },
    "externalId": {
      "type": [
        "string",
        "null"
      ]
    },
    "amount": {
      "type": "string"
    },
    "fee": {
      "type": "string"
    },
    "platformFee": {
      "description": "null in the example; holds a value when set."
    },
    "platformFeeBps": {
      "type": "integer"
    },
    "currency": {
      "type": "string"
    },
    "payoutCurrency": {
      "type": "string"
    },
    "rail": {
      "type": "string"
    },
    "state": {
      "type": "string"
    },
    "receiptAmount": {
      "type": [
        "string",
        "null"
      ]
    },
    "txHash": {
      "description": "null in the example; holds a value when set."
    },
    "toAddress": {
      "type": [
        "string",
        "null"
      ]
    },
    "chainStatus": {
      "type": "string"
    },
    "railReference": {
      "$ref": "#/$defs/RailReference"
    },
    "delivered": {
      "type": "boolean"
    },
    "paidToBank": {
      "type": "boolean"
    },
    "approval": {
      "type": "string"
    },
    "scheduledAt": {
      "description": "null in the example; holds a value when set."
    },
    "schedule": {
      "description": "null in the example; holds a value when set."
    },
    "review": {
      "type": "string"
    },
    "reviewReasons": {
      "type": "array"
    },
    "destinationAmount": {
      "type": [
        "string",
        "null"
      ]
    },
    "underfundedBy": {
      "description": "null in the example; holds a value when set."
    },
    "fxExcess": {
      "type": [
        "object",
        "null"
      ]
    },
    "feeCredit": {
      "description": "null in the example; holds a value when set."
    },
    "leg": {
      "type": "string"
    },
    "fallback": {
      "type": "string"
    },
    "fallbackOf": {
      "type": [
        "string",
        "null"
      ]
    },
    "fallbackPayout": {
      "type": [
        "string",
        "null"
      ]
    },
    "fallbackProblem": {
      "description": "null in the example; holds a value when set."
    },
    "requestedAt": {
      "type": "string",
      "format": "date-time"
    },
    "sentAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "paidAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "businessDaysToPaid": {
      "type": [
        "integer",
        "null"
      ]
    },
    "late": {
      "type": "boolean"
    },
    "problem": {
      "type": [
        "string",
        "null"
      ]
    },
    "livemode": {
      "type": "boolean"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "metadata": {
      "type": "object",
      "properties": {},
      "additionalProperties": true
    },
    "sandbox": {
      "type": "boolean"
    },
    "funding": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "amount": {
          "type": "string"
        },
        "transfer": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "outcome": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "confirmations": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "description": "Confirmations the delivery had when SET last read the chain; null until read (staging never is)."
    },
    "requiredConfirmations": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1,
      "description": "Confirmations its chain needs before SET calls it confirmed: ethereum 12, polygon 64, base, arbitrum and optimism 10, avalanche 3, celo 6, bitcoin 3, solana 1 (finalized commitment)."
    },
    "finalityStatus": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "pending",
        "confirming",
        "confirmed",
        "finalized",
        "reorg_review",
        "reorg_failed",
        null
      ],
      "description": "pending (no block yet), confirming (below requiredConfirmations), confirmed, finalized (the same block at twice the depth), or reorg_review: the confirming block is no longer the chain's; nothing moves on by itself until SET's operator reviews it. The operator resolves it finalized (reconfirmed on chain proof) or reorg_failed (the delivery is not on the chain; never delivered), with <object>.reorg_resolved."
    },
    "quote": {
      "type": [
        "string",
        "null"
      ],
      "description": "The locked quote (qt_…) this payout executes on; null for none."
    }
  },
  "additionalProperties": true,
  "required": [
    "object",
    "id"
  ],
  "$defs": {
    "RailReference": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "rail": {
          "type": "string",
          "description": "The rail, as the provider names it: ach, wire, sepa, faster_payments, spei, pix, fednow, …"
        },
        "traceNumber": {
          "type": [
            "string",
            "null"
          ],
          "description": "ACH trace number; null when the rail has none."
        },
        "imad": {
          "type": [
            "string",
            "null"
          ],
          "description": "Fedwire IMAD; null when the rail has none."
        },
        "trackingNumber": {
          "type": [
            "string",
            "null"
          ],
          "description": "UETR on SWIFT, SEPA and Faster Payments; clave de rastreo on SPEI; end-to-end id on PIX. null when the rail has none."
        },
        "endToEndId": {
          "type": [
            "string",
            "null"
          ],
          "description": "FedNow end-to-end id (assigned by the sending bank; not guaranteed unique). null when the rail has none."
        },
        "simulated": {
          "type": "boolean",
          "description": "Staging only: written by SET's simulator, never by a bank."
        }
      },
      "additionalProperties": true,
      "description": "The bank rail's own reference for a payment, as the provider reports it once a bank payment is processed. Identifiers only. null until then, and for payments on chain or by card."
    }
  }
}