{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gsma/json-schema/gsma-refund-schema.json",
  "title": "Refund",
  "description": "Information about a Refund resource.",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gsma-refund-api-openapi.yml#/components/schemas/Refund",
  "type": "object",
  "required": [
    "refundId",
    "refundStatus",
    "refundCreationDate",
    "type"
  ],
  "properties": {
    "refundId": {
      "type": "string",
      "description": "Unique Identifier of the refund"
    },
    "refundStatus": {
      "type": "string",
      "description": "Specifies the refund status (`processing`, `denied`, `succeeded`)."
    },
    "type": {
      "type": "string",
      "description": "Type of refund.\n- `total` stands for a final refund, where whole amount is refunded so as it is not indicated by API Consumer. No more refunds are allowed for that `paymentId`.\n- `partial` stands for a partial refund, whose amount is indicated by API Consumer. More refunds are allowed for that `paymentId`.",
      "enum": [
        "total",
        "partial"
      ]
    },
    "refundCreationDate": {
      "type": "string",
      "format": "date-time",
      "description": "Date time when the refund is created in server database. This is a technical information. It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone."
    },
    "refundDate": {
      "type": "string",
      "format": "date-time",
      "description": "Date time when the refund is effectively performed. This is a business information. It must follow [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) and must have time zone."
    },
    "reason": {
      "type": "string",
      "description": "Reason provided to request the refund. Optionally provided by the user or the merchant."
    },
    "sink": {
      "type": "string",
      "format": "uri",
      "pattern": "^https:\\/\\/.+$",
      "description": "The address to which events shall be delivered, using the HTTP protocol."
    }
  }
}