{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/debitmydata/json-schema/debitmydata-payment-status-response-schema.json",
  "title": "PaymentStatusResponse",
  "x-generated": "2026-11-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/debitmydata-openapi.json#/components/schemas/PaymentStatusResponse",
  "properties": {
    "payment_intent_id": {
      "type": "string",
      "title": "Payment Intent Id"
    },
    "registration_intent_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Registration Intent Id"
    },
    "purchase_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Purchase Id"
    },
    "payment_option": {
      "type": "string",
      "title": "Payment Option"
    },
    "status": {
      "$ref": "#/$defs/PaymentStatus"
    },
    "asset": {
      "type": "string",
      "title": "Asset"
    },
    "network": {
      "type": "string",
      "title": "Network"
    },
    "amount_due": {
      "type": "string",
      "title": "Amount Due"
    },
    "amount_received": {
      "type": "string",
      "title": "Amount Received"
    },
    "confirmations": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Confirmations"
    },
    "required_confirmations": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Required Confirmations"
    },
    "transactions": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Transactions"
    },
    "refund_due": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Refund Due"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "title": "Expires At"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At"
    },
    "next_action": {
      "type": "string",
      "title": "Next Action"
    },
    "payment_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Payment Url"
    }
  },
  "type": "object",
  "required": [
    "payment_intent_id",
    "registration_intent_id",
    "payment_option",
    "status",
    "asset",
    "network",
    "amount_due",
    "amount_received",
    "confirmations",
    "required_confirmations",
    "transactions",
    "refund_due",
    "expires_at",
    "updated_at",
    "next_action"
  ],
  "$defs": {
    "PaymentStatus": {
      "type": "string",
      "enum": [
        "created",
        "awaiting_payment",
        "detected",
        "confirming",
        "verified",
        "settled",
        "failed",
        "expired",
        "underpaid",
        "overpaid",
        "reorged",
        "reversed",
        "refunded",
        "disputed"
      ],
      "title": "PaymentStatus"
    }
  }
}