{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://smklog.com/developers/schemas/refund-status.schema.json",
  "title": "RefundStatus",
  "type": "object",
  "description": "Where the refund of the payment behind a payment session stands, read from SMKlog order records. Never carries names, addresses, emails or card details.",
  "required": [
    "session_id",
    "status",
    "amount_paid",
    "amount_refunded",
    "currency",
    "policy",
    "next"
  ],
  "properties": {
    "session_id": {
      "type": "string",
      "description": "The session asked about"
    },
    "order_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "SMKlog order id of the checkout this answer is about (the one getCheckoutStatus reports), the reference for support; null before the human opened checkout"
    },
    "status": {
      "type": "string",
      "enum": [
        "not_paid",
        "none",
        "requested",
        "under_review",
        "declined",
        "partially_refunded",
        "refunded"
      ],
      "description": "not_paid: nothing was paid, nothing to refund. none: paid and not refunded. requested: a refund is under way. under_review: the label looks unused but its carrier is not USPS, so an operator decides. declined: the carrier refused the postage refund because the label was scanned. partially_refunded: part of the payment came back. refunded: the payment was refunded."
    },
    "reason": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "unused_label",
        "void_request",
        "other",
        null
      ],
      "description": "unused_label: the automatic refund of a label the carrier never scanned. void_request: a void request filed with requestLabelVoid is waiting on an operator (status under_review; it lapses if the carrier scans the label first). other: any other refund SMKlog made (a label that could not be issued after payment, a support decision). null while nothing was refunded or requested."
    },
    "amount_paid": {
      "type": "number",
      "description": "What the human paid, USD; 0 while not_paid"
    },
    "amount_refunded": {
      "type": "number",
      "description": "What has been refunded so far, USD; 0 until a refund completes"
    },
    "currency": {
      "type": "string",
      "enum": [
        "USD"
      ],
      "description": "ISO currency, USD"
    },
    "requested_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the automatic unused-label refund was requested from the carrier; null otherwise"
    },
    "void_requested_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When a void request was filed for this label with requestLabelVoid; null when none was"
    },
    "policy": {
      "type": "string",
      "description": "The refund policy in force, in one paragraph built from the settings the refund sweep runs on"
    },
    "next": {
      "type": "string",
      "description": "What, if anything, the agent should do now"
    }
  },
  "x-provenance": {
    "method": "published",
    "publisher": "SMKlog (SMKLOG-2022 LLC)",
    "source": "https://quote-api.smklog.com/openapi.json",
    "published": "2026-11-26"
  }
}
