{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/verifone/refs/heads/main/json-schema/order-service-api-cardproductsurcharge.json",
  "title": "CardProductSurcharge",
  "description": "Surcharging settings",
  "type": "object",
  "properties": {
    "ProductId": {
      "type": "string",
      "description": "Link to the card product which this surcharge applies to. Contact Verifone for card products applicable to your estate.",
      "pattern": "^.*$",
      "minLength": 0,
      "maxLength": 150
    },
    "SurchargeType": {
      "description": "Surcharge Type (Domestic)\n\n0 - Not configured\n\n1 - Fixed Amount\n\n2 - Percentage",
      "type": "string",
      "minLength": 1,
      "maxLength": 1,
      "pattern": "[0-2]"
    },
    "SurchargeValue": {
      "description": "Specifies the value of the surcharge depending on the surcharge type. Can be a fixed value (eg 2.5 = $2.50) or a percentage (eg 1.2 = 1.2%).",
      "type": "string",
      "minLength": 1,
      "maxLength": 150,
      "pattern": "^[0-9]+(\\.[0-9]{1,2})?$"
    },
    "MaxSurchargeAdjAmount": {
      "description": "Applicable only when Surcharge Type is Percentage. Amount is in default Terminal currency, represented as a decimal number. Specifies the maximum surcharge amount; if the calculated surcharge is above this value, the Surcharge Max Adjustment amount will be applied instead.",
      "type": "string",
      "minLength": 1,
      "maxLength": 15,
      "pattern": "^[0-9]+(\\.[0-9]{1,2})?$",
      "default": "0"
    },
    "MinSurchargeAdjAmount": {
      "description": "Applicable only when Surcharge Type is Percentage. Amount is in default Terminal currency, represented as a decimal number. Specifies the minimum surcharge amount; if the calculated surcharge is below this value, the Surcharge Min Adjustment amount will be applied instead.",
      "type": "string",
      "minLength": 1,
      "maxLength": 15,
      "pattern": "^[0-9]+(\\.[0-9]{1,2})?$",
      "default": "0"
    },
    "MaxSurchargeableAmount": {
      "description": "Amount is in default Terminal currency, represented as a decimal number. When the transaction amount is above this maximum, no surcharge will be applied.",
      "type": "string",
      "minLength": 1,
      "maxLength": 15,
      "pattern": "^[0-9]+(\\.[0-9]{1,2})?$",
      "default": "0"
    },
    "MinSurchargeableAmount": {
      "description": "Amount is in default Terminal currency, represented as a decimal number. When the transaction amount is below this minimum, no surcharge will be applied.",
      "type": "string",
      "minLength": 1,
      "maxLength": 15,
      "pattern": "^[0-9]+(\\.[0-9]{1,2})?$",
      "default": "0"
    },
    "UseDomesticConfigForInternational": {
      "description": "When enabled (true), surcharging of transactions that utilize international payment methods follows the surcharge parameter settings and rules as defined for domestic payment methods; and the international configuration variants are ignored. When disabled (false), unique International configuration parameters will control surcharging of transactions that utilize international payment methods.",
      "type": "string",
      "default": "1",
      "minLength": 1,
      "maxLength": 1,
      "pattern": "[0-1]"
    }
  },
  "required": [
    "ProductId",
    "SurchargeType",
    "SurchargeValue"
  ]
}