{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/citi/json-schema/citi-payment-response-schema.json",
  "title": "PaymentResponse",
  "description": "Response body for payment initiation. Contains the details of the payment.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/citi-payment-api-openapi.yml#/components/schemas/Payment-Response",
  "type": "object",
  "properties": {
    "ref_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120,
      "description": "Unique ID for the Transaction.",
      "title": "ref_id"
    },
    "status": {
      "$ref": "#/$defs/Status"
    },
    "message": {
      "$ref": "#/$defs/Message"
    },
    "message_id": {
      "$ref": "#/$defs/Message-Id"
    },
    "transaction": {
      "type": "array",
      "title": "transaction",
      "items": {
        "$ref": "#/$defs/Transaction"
      }
    }
  },
  "$defs": {
    "End-To-End-Id": {
      "type": "string",
      "title": "end_to_end_id",
      "description": "The unique payment request ID from your system. If the request is for payment to wallet, this field should contain maximum 16 character and should be in UPPER CASE.",
      "minLength": 1,
      "maxLength": 35
    },
    "Error-Detail": {
      "type": "object",
      "title": "ErrorDetail",
      "properties": {
        "issue": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "description": "more details about the issue",
          "title": "issue"
        },
        "action": {
          "type": "string",
          "maxLength": 350,
          "description": "corrective action to be taken to resolve above issue",
          "title": "action"
        },
        "code": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64,
          "description": "unique code representing the issue",
          "title": "code"
        }
      }
    },
    "Message": {
      "type": "string",
      "description": "Description of the status.",
      "title": "message",
      "minLength": 1,
      "maxLength": 500
    },
    "Message-Id": {
      "type": "string",
      "title": "message_id",
      "description": "Unique id from your system for batch. Required for Payment to Wallet (virtual_account credit).",
      "minLength": 1,
      "maxLength": 34
    },
    "Status": {
      "type": "string",
      "description": "Status of the request.",
      "title": "status",
      "minLength": 1,
      "maxLength": 64
    },
    "Transaction": {
      "title": "Transaction",
      "type": "object",
      "description": "Details of the transaction.",
      "properties": {
        "end_to_end_id": {
          "allOf": [
            {
              "$ref": "#/$defs/End-To-End-Id"
            }
          ],
          "description": "Unique identifier for the payment. Required when initiating payments (payment to wallet and payment to external)."
        },
        "error_details": {
          "type": "array",
          "description": "List of error details.",
          "title": "error_details",
          "items": {
            "$ref": "#/$defs/Error-Detail"
          }
        }
      }
    }
  }
}