{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/swapwallet-app/json-schema/swapwallet-app-pay-invoice-request-schema.json",
  "title": "PayInvoiceRequest",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/swapwallet-app-openapi.yaml#/components/schemas/PayInvoiceRequest",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "description": "شناسه‌ی فاکتور"
    },
    "amount": {
      "$ref": "#/$defs/Money",
      "description": "مبلغ پرداخت؛ باید دقیقاً برابر `invoice.amount` باشد"
    }
  },
  "required": [
    "id",
    "amount"
  ],
  "$defs": {
    "Money": {
      "type": "object",
      "properties": {
        "number": {
          "type": "string"
        },
        "unit": {
          "type": "string",
          "description": "واحد ارزی (مثلاً USDT، IRT، USD)"
        }
      },
      "required": [
        "number",
        "unit"
      ]
    }
  }
}