{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/orsunpay-com/json-schema/orsunpay-com-refunds-response-dto-schema.json",
  "title": "RefundsResponseDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/orsunpay-com-refunds-api-openapi.yml#/components/schemas/RefundsResponseDto",
  "properties": {
    "data": {
      "items": {
        "$ref": "#/$defs/RefundDto"
      },
      "type": "array"
    },
    "nextCursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "data",
    "nextCursor"
  ],
  "type": "object",
  "$defs": {
    "RefundDto": {
      "properties": {
        "amount": {
          "pattern": "^(0|[1-9]\\d{0,19})(\\.\\d{1,18})?$",
          "type": "string"
        },
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "errorCode": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "id": {
          "type": "string"
        },
        "metadata": {
          "additionalProperties": true,
          "type": "object"
        },
        "providerRefundId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "reason": {
          "enum": [
            "requested_by_customer",
            "duplicate",
            "fraudulent",
            "other"
          ],
          "type": "string"
        },
        "status": {
          "enum": [
            "PENDING",
            "PROCESSING",
            "SUCCEEDED",
            "FAILED",
            "CANCELED"
          ],
          "type": "string"
        },
        "transactionId": {
          "type": "string"
        },
        "updatedAt": {
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "id",
        "transactionId",
        "amount",
        "currency",
        "status",
        "reason",
        "providerRefundId",
        "errorCode",
        "metadata",
        "createdAt",
        "updatedAt"
      ],
      "type": "object"
    }
  }
}