{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/outpost-ai/json-schema/outpost-ai-refund-response-schema.json",
  "title": "RefundResponse",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/outpost-ai-stripe-mor.yaml#/components/schemas/RefundResponse",
  "type": "object",
  "required": [
    "id",
    "payment_id",
    "amount",
    "currency",
    "status",
    "processor_references",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Outpost-owned refund identifier."
    },
    "payment_id": {
      "type": "string",
      "description": "The payment this refund applies to."
    },
    "amount": {
      "type": "integer"
    },
    "currency": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "description": "For cards and Link this is synchronous; for bank debits the refund\nstarts as `pending` and transitions via the `payment.refunded`\nwebhook.\n",
      "enum": [
        "succeeded",
        "pending",
        "failed"
      ]
    },
    "reason": {
      "type": [
        "string",
        "null"
      ]
    },
    "processor_references": {
      "type": "object",
      "properties": {
        "refund_id": {
          "type": "string",
          "description": "Refund ID on Outpost's PSP account."
        }
      }
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}