{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/citi/json-schema/citi-refund-update-request-schema.json",
  "title": "Refund update request",
  "description": "Payment Update Request",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/citi-refunds-api-openapi.yml#/components/schemas/Refund-Update-Request",
  "type": "object",
  "required": [
    "transaction",
    "method"
  ],
  "properties": {
    "method": {
      "$ref": "#/$defs/Refund-Method-Update"
    },
    "transaction": {
      "$ref": "#/$defs/Refund-Transaction-Update"
    },
    "order": {
      "$ref": "#/$defs/Refund-Order-Update"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Refund-Method-Update": {
      "type": "object",
      "title": "Refund Method Update",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "description": "Method specified by the customer for the transaction  \n- For CARD,GOOGLEPAY and APPLEPAY Void/Cancel operation method.type parameter is mandatory \n- Provide GOOGLEPAY for GOOGLE PAY transactions \n- Provide APPLEPAY for APPLE PAY transactions \n- Provide CARD for CARD transactions ",
          "type": "string",
          "enum": [
            "CARD",
            "GOOGLEPAY",
            "APPLEPAY"
          ],
          "title": "type"
        }
      }
    },
    "Refund-Order-Update": {
      "title": "Refund Order Update",
      "properties": {
        "id": {
          "description": "A unique identifier for this order to distinguish it from any other order you create. \n- For CARD/GOOGLEPAY/APPLEPAY transactions, order.id parameter is mandatory",
          "maxLength": 50,
          "minLength": 1,
          "type": "string",
          "title": "id"
        }
      },
      "type": "object"
    },
    "Refund-Transaction-Update": {
      "type": "object",
      "title": "Refund Transaction Update",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "description": "Unique Transaction identification provided by the merchant during  transaction update  \n- For CARD/GOOGLEPAY/APPLEPAY transactions, transaction.id parameter is mandatory and allowed maxmium length is 40.",
          "maxLength": 128,
          "minLength": 1,
          "type": "string",
          "title": "id"
        },
        "reference": {
          "description": "Transaction additional information. \n- For Brazil PIX Cancellation, this parameter is mandatory with min length 26 & mmax length 35 and input should be same as unique identifier (transaction.id) given during PIX Initiation",
          "maxLength": 250,
          "minLength": 1,
          "type": "string",
          "title": "reference"
        },
        "currency_code": {
          "type": "string",
          "enum": [
            "USD"
          ],
          "description": "ISO 4217 Currency Code for instance  USD/GBP/EUR. \n- For CARD/GOOGLEPAY/APPLEPAY transactions, transaction.currency_code parameter is mandatory",
          "title": "currency_code"
        },
        "country_code": {
          "description": "The order country. \n- For CARD/GOOGLEPAY/APPLEPAY transactions, transaction.country_code parameter is mandatory",
          "enum": [
            "US"
          ],
          "type": "string",
          "title": "country_code"
        },
        "reason": {
          "description": "Cancellation/refund/adjustment reason. ",
          "maxLength": 140,
          "minLength": 1,
          "type": "string",
          "title": "reason"
        },
        "target_transaction_id": {
          "description": "The identifier for the transaction you wish to refund, That is the {transactionId} URL parameter for REST and the transaction.id parameter for NVP.",
          "maxLength": 128,
          "minLength": 1,
          "type": "string",
          "title": "target_transaction_id"
        },
        "correlation_id": {
          "description": "A transient identifier for the request, that can be used to match the response to the request.",
          "maxLength": 128,
          "minLength": 1,
          "type": "string",
          "title": "correlation_id"
        }
      }
    }
  }
}