{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/simcloud-co-za/json-schema/simcloud-co-za-recharge-status-schema.json",
  "title": "RechargeStatus",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/simcloud-co-za-openapi.yaml#/components/schemas/RechargeStatus",
  "type": "object",
  "required": [
    "status",
    "service",
    "request_id",
    "msisdn",
    "network",
    "amount",
    "reference",
    "platform_order_number",
    "queue_status",
    "final_order_id",
    "final_order_status",
    "error",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "pending",
        "delivered",
        "failed"
      ]
    },
    "service": {
      "type": "string",
      "enum": [
        "airtime",
        "data"
      ]
    },
    "request_id": {
      "type": "integer",
      "minimum": 1
    },
    "msisdn": {
      "type": "string"
    },
    "network": {
      "type": "string"
    },
    "amount": {
      "type": "number"
    },
    "reference": {
      "type": "string"
    },
    "platform_order_number": {
      "description": "Null before placement.",
      "oneOf": [
        {
          "type": [
            "integer",
            "null"
          ]
        },
        {
          "type": "string",
          "pattern": "^[0-9]+$"
        }
      ]
    },
    "queue_status": {
      "type": [
        "string",
        "null"
      ]
    },
    "final_order_id": {
      "type": [
        "integer",
        "null"
      ]
    },
    "final_order_status": {
      "type": [
        "string",
        "null"
      ]
    },
    "error": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "$ref": "#/$defs/LocalTimestamp"
    },
    "updated_at": {
      "$ref": "#/$defs/LocalTimestamp"
    }
  },
  "$defs": {
    "LocalTimestamp": {
      "type": "string",
      "description": "Local timestamp in Africa/Johannesburg, using YYYY-MM-DD HH:MM:SS."
    }
  }
}