{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/hostinger/main/json-schema/hostinger-billing-v1-order-order-resource-schema.json",
  "title": "Billing.V1.Order.OrderResource",
  "x-generated": "2026-10-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hostinger-billing-orders-api-openapi.yml#/components/schemas/Billing.V1.Order.OrderResource",
  "properties": {
    "id": {
      "description": "Order ID",
      "type": "integer"
    },
    "subscription_id": {
      "description": "Subscription ID",
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "completed",
        "pending",
        "processing",
        "failed",
        "refunded",
        "cancelled",
        "awaiting_payment",
        "payment_initiated",
        "fraud_refund"
      ]
    },
    "currency": {
      "description": "Currency code",
      "type": "string"
    },
    "subtotal": {
      "description": "Subtotal price (exc. VAT) in cents",
      "type": "integer"
    },
    "total": {
      "description": "Total price (inc. VAT) in cents",
      "type": "integer"
    },
    "billing_address": {
      "$ref": "#/$defs/Billing.V1.Order.OrderBillingAddressResource"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "type": "object",
  "$defs": {
    "Billing.V1.Order.OrderBillingAddressResource": {
      "properties": {
        "first_name": {
          "type": "string"
        },
        "last_name": {
          "type": "string"
        },
        "company": {
          "type": [
            "string",
            "null"
          ]
        },
        "address_1": {
          "type": [
            "string",
            "null"
          ]
        },
        "address_2": {
          "type": [
            "string",
            "null"
          ]
        },
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "state": {
          "type": [
            "string",
            "null"
          ]
        },
        "zip": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "type": [
            "string",
            "null"
          ]
        },
        "phone": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}