{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/citi/json-schema/citi-payment-l0-refund-notification-schema.json",
  "title": "Payment Initial Refund Notification",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/citi-refunds-api-openapi.yml#/components/schemas/Payment-L0-Refund-Notification",
  "type": "object",
  "required": [
    "method",
    "transaction"
  ],
  "properties": {
    "method": {
      "$ref": "#/$defs/Refund-L0-Method-Status"
    },
    "transaction": {
      "$ref": "#/$defs/Refund-L0-Transaction-Status"
    },
    "order": {
      "$ref": "#/$defs/Refund-Order"
    },
    "original_payment": {
      "$ref": "#/$defs/Original-Initial-Payment"
    }
  },
  "$defs": {
    "Card-Refund-Response": {
      "title": "card",
      "description": "Card Method Response",
      "properties": {
        "brand": {
          "description": "The brand name used to describe the card that is recognized and accepted globally. For many major card types this will match the scheme name. In some markets, a card may also be co-branded with a local brand that is recognized and accepted within its country/region of origin (see card.localBrand).You may use this information to support surcharging decisions. This information is gathered from 3rd party sources and may not be accurate in all circumstances. \n- For Card transaction, card.brand parameter is mandatory",
          "enum": [
            "AMEX",
            "CHINA_UNIONPA",
            "DINERS_CLUB",
            "DISCOVER",
            "JCB",
            "LOCAL_BRAND_ONLY",
            "MAESTRO",
            "MASTERCARD",
            "RUPAY",
            "UATP",
            "UNKNOWN",
            "VISA"
          ],
          "type": "string",
          "title": "brand"
        },
        "scheme": {
          "description": "The organization that owns a card brand and defines operating regulations for its use. The card scheme also controls authorization and settlement of card transactions among issuers and acquirers. \n- For Card transaction, card.scheme parameter is mandatory",
          "enum": [
            "AMEX",
            "CHINA_UNIONPA",
            "DINERS_CLUB",
            "DISCOVER",
            "JCB",
            "LOCAL_BRAND_ONLY",
            "MAESTRO",
            "MASTERCARD",
            "RUPAY",
            "UATP",
            "UNKNOWN",
            "VISA"
          ],
          "type": "string",
          "title": "scheme"
        },
        "funding_method": {
          "description": "The method used by the payer to provide the funds for the payment.You may use this information to support surcharging decisions. This information is gathered from 3rd party sources and may not be accurate in all circumstances. \n- For Card transaction, card.funding_method parameter is mandatory",
          "enum": [
            "CHARGE",
            "CREDIT",
            "DEBIT",
            "UNKNOWN"
          ],
          "type": "string",
          "title": "funding_method"
        },
        "stored_on_file": {
          "description": "This parameter only applies if you collect card details from your payer, store them, and either you or your payer use the stored credentials for subsequent payments.",
          "enum": [
            "NOT_STORED",
            "STORED",
            "TO_BE_STORED"
          ],
          "type": "string",
          "title": "stored_on_file"
        }
      }
    },
    "Original-Initial-Payment": {
      "type": "object",
      "title": "Original payment",
      "description": "Either populate UETR OR (id AND value_date) for the refund to be processed \n- For Brazil PIX, India UPI and UK FPS refund payment, original_payment object is mandatory",
      "properties": {
        "id": {
          "description": "The original payment transaction identification",
          "maxLength": 128,
          "minLength": 1,
          "type": "string",
          "title": "id"
        },
        "uetr": {
          "type": "string",
          "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$",
          "description": "UUID v4 format unique end-to-end transaction reference. \n- For ACH Return & Reversal, this parameter is mandatory.",
          "title": "uetr"
        },
        "value_date": {
          "type": "string",
          "format": "date",
          "description": "Format YYYY-MM-DD Date in local time zone (e.g., EST for a United States RTP network transaction) when Citi's transaction processing application starts processing a transaction",
          "title": "value_date"
        }
      }
    },
    "Refund-L0-Method-Status": {
      "title": "Method",
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "description": "Method specified by the customer for the transaction \n- Provide PIX for brazil QR creation \n- Provide CARD for CARD transactions \n- Provide UPI for India UPI transactions \n- Provide FPS for UK transactions \n- Provide PAYPAL for PAYPAL transactions \n- Provide ACH for US Return & Reversal \n- Provide GOOGLEPAY for GOOGLEPAY transactions \n- Provide APPLEPAY for APPLEPAY transactions",
          "type": "string",
          "enum": [
            "PIX",
            "CARD",
            "UPI",
            "FPS",
            "ACH",
            "PAYPAL",
            "GOOGLEPAY",
            "APPLEPAY",
            "AFTERPAY",
            "AMAZON_PAY",
            "BITPAY",
            "BIZUM",
            "ALIPAY",
            "TRUSTLY",
            "BLIK",
            "BLIK_BNPL",
            "CASH_APP",
            "DOKU_WALLET",
            "EPS",
            "ESTONIAN_BANKS",
            "VERKKOPANKKI",
            "FLOAPAY",
            "FPX",
            "GOPAY",
            "IDEAL",
            "INDOMARET",
            "INDONESIAN_BANKS",
            "JENIUS_PAY",
            "KREDIVO",
            "LATVIAN_BANKS",
            "LINK_AJA",
            "LITHUANIAN_BANKS",
            "MBWAY",
            "MULTIBANCO",
            "OVO_WALLET",
            "PAYSAFECARD",
            "P24",
            "SATISPAY",
            "SCALAPAY",
            "SKRILL",
            "SWISH",
            "THAIBANKS",
            "TWINT",
            "WERO",
            "ZIP",
            "BANCOMATPAY",
            "DRAGONPAY",
            "MYBANK",
            "ALFAMART",
            "PAYU",
            "BANCONTACT",
            "STABLECOINS",
            "OXXO_PAY"
          ],
          "title": "type"
        },
        "card": {
          "$ref": "#/$defs/Card-Refund-Response"
        }
      }
    },
    "Refund-L0-Transaction-Status": {
      "title": "Transaction",
      "required": [
        "id",
        "country_code"
      ],
      "properties": {
        "id": {
          "maxLength": 128,
          "minLength": 1,
          "type": "string",
          "description": "Unique Transaction identification provided by the merchant during transaction refund creation. \n- For ACH Return & Reversal, this parameter is mandatory.",
          "title": "id"
        },
        "amount": {
          "description": "Transaction amount \n - For Brazil QR Creation decimal values are mandatory for transaction.amount and it must have 2 digits \n - For Brazil QR Creation maxmium amount limit is 9999999999.99 and transaction.amount parameter is mandatory \n- For CARD Capture operation transaction.amount parameter is mandatory and allowed max 2 decimal after dot.",
          "maximum": 1000000000000000000,
          "minimum": 0.01,
          "type": "number",
          "title": "amount"
        },
        "uetr": {
          "type": "string",
          "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$",
          "description": "UUID v4 format unique end-to-end transaction reference",
          "title": "uetr"
        },
        "reason_code": {
          "description": "Transaction rejection Code",
          "maxLength": 100,
          "minLength": 1,
          "type": "string",
          "title": "reason_code"
        },
        "value_date": {
          "type": "string",
          "format": "date",
          "description": "Date in local time zone (e.g., EST for a United States RTP network transaction) when Citi's transaction processing application starts processing a transaction \n- Format YYYY-MM-DD",
          "title": "value_date"
        },
        "currency_code": {
          "description": "ISO 4217 Currency Code for instance  USD/GBP/EUR/INR \n- transaction.currency_code parameter is mandatory for all transaction type creation",
          "enum": [
            "BRL",
            "USD",
            "INR",
            "GBP",
            "EUR",
            "CAD",
            "HKD",
            "AUD",
            "SGD",
            "DKK",
            "NOK",
            "SEK",
            "PLN",
            "IDR",
            "MYR",
            "THB",
            "CHF",
            "PHP",
            "CZK"
          ],
          "type": "string",
          "title": "currency_code"
        },
        "country_code": {
          "description": "Country code \n- For ACH Return & Reversal, this parameter is mandatory.",
          "enum": [
            "US",
            "BR",
            "IN",
            "GB",
            "TH",
            "AU",
            "CA",
            "MX",
            "DE",
            "NL",
            "IE",
            "IT",
            "FR",
            "ES",
            "HK",
            "SG",
            "NZ",
            "DK",
            "NO",
            "SE",
            "SW",
            "BE",
            "FI",
            "CH",
            "CZ",
            "AT",
            "PT"
          ],
          "type": "string",
          "title": "country_code"
        },
        "reason": {
          "description": "Cancellation/adjustment reason. \n- For ACH Return & Reversal, this parameter is optional.",
          "maxLength": 140,
          "minLength": 1,
          "type": "string",
          "title": "reason"
        },
        "creation_date_time": {
          "description": "GMT (ISO 8601 YYYY-MM-DDTHH:MM:SS.sssZ)- Instant Payment (Debit) - Date time, generated by CitiConnect API, when CitiConnect API accepted a payment initiation after validation \n- Instant Payment (Credit) - Date time, either provided by the debtor bank or generated by Citi's transaction processing application, when a transaction was created \n- For ACH Return & Reversal, this parameter is mandatory.",
          "type": "string",
          "format": "date-time",
          "title": "creation_date_time"
        },
        "status": {
          "type": "string",
          "maxLength": 20,
          "description": "Transaction Status, following status you will receive in response \n- CREATED - The transaction has successfully been created",
          "title": "status"
        },
        "description": {
          "type": "string",
          "maxLength": 200,
          "description": "Transaction Status, following status you will receive in response \n- CREATED - The transaction has successfully been created",
          "title": "description"
        },
        "status_date_time": {
          "type": "string",
          "format": "date-time",
          "description": "GMT (ISO 8601 YYYY-MM-DDTHH:MM:SS.sssZ) \n- Date time of transaction status",
          "title": "status_date_time"
        },
        "action": {
          "description": "Indicates if this request is for Return or Reversal \n - For ACH Return & Reversal, this is a mandatory parameter",
          "enum": [
            "RETURN",
            "REVERSAL"
          ],
          "type": "string",
          "title": "action"
        }
      }
    },
    "Refund-Order": {
      "title": " Refund Order",
      "properties": {
        "id": {
          "description": "A unique identifier for this order to distinguish it from any other order you create. \n- The order.id parameter is optional for Card transaction and its mandatory",
          "maxLength": 40,
          "minLength": 1,
          "type": "string",
          "title": "id"
        },
        "reference": {
          "description": "An optional identifier for the orderFor example, a shopping cart number, an order number, or an invoice number.  \n - The order.reference parameter is optional for Card transaction and allowed maxlength is 200",
          "maxLength": 250,
          "minLength": 1,
          "type": "string",
          "title": "reference"
        }
      }
    }
  }
}