{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/orsunpay-com/json-schema/orsunpay-com-payment-link-response-dto-schema.json",
  "title": "PaymentLinkResponseDto",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/orsunpay-com-openapi.json#/components/schemas/PaymentLinkResponseDto",
  "properties": {
    "amount": {
      "pattern": "^(0|[1-9]\\d{0,19})(\\.\\d{1,18})?$",
      "type": "string"
    },
    "createdAt": {
      "format": "date-time",
      "type": "string"
    },
    "currency": {
      "type": "string"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "expired": {
      "type": "boolean"
    },
    "expiresAt": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "failureUrl": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "id": {
      "type": "string"
    },
    "isActive": {
      "type": "boolean"
    },
    "livemode": {
      "description": "The live/test mode inherited from the authenticated API key.",
      "type": "boolean"
    },
    "maxUses": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "merchantId": {
      "type": "string"
    },
    "metadata": {
      "additionalProperties": true,
      "type": "object"
    },
    "reusable": {
      "type": "boolean"
    },
    "slug": {
      "pattern": "^[A-Za-z0-9]{24}$",
      "type": "string"
    },
    "status": {
      "enum": [
        "ACTIVE",
        "INACTIVE",
        "EXPIRED",
        "EXHAUSTED"
      ],
      "type": "string"
    },
    "successUrl": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "url": {
      "anyOf": [
        {
          "description": "Null when hosted checkout is disabled.",
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "usesCount": {
      "type": "number"
    }
  },
  "required": [
    "livemode",
    "id",
    "merchantId",
    "slug",
    "amount",
    "currency",
    "description",
    "reusable",
    "maxUses",
    "usesCount",
    "expiresAt",
    "successUrl",
    "failureUrl",
    "metadata",
    "isActive",
    "expired",
    "status",
    "createdAt",
    "url"
  ],
  "type": "object"
}