{
  "tool_id": "art-243-purpose-code-requirement-checker",
  "note": "ISO 20022 purpose code jurisdiction mandate check + SwiftGo eligibility. Vector 1: UAE mandatory + SwiftGo eligible. Vector 2: India mandatory, code missing, above SwiftGo threshold. Vector 3: empty-input finite.",
  "vectors": [
    {
      "name": "uae_mandatory_purpose_code_compliant",
      "description": "UAE beneficiary corridor with valid purpose code and amount within SwiftGo threshold. Jurisdiction mandate met, SwiftGo eligible.",
      "policy_parameters": {
        "beneficiary_country": "AE",
        "payment_amount_usd": 5000,
        "purpose_code": "TRAD",
        "category_purpose_code": "TRAD"
      },
      "output_payload": {
        "jurisdiction_requires_purpose_code": true,
        "jurisdiction_reason": "UAE Central Bank requires PurpCd on all inbound cross-border payments.",
        "required_code_types": [
          "PurpCd"
        ],
        "code_type_required": "PurpCd",
        "purpose_code_compliant": true,
        "purpose_code_provided": true,
        "purpose_format_valid": true,
        "category_purpose_code_provided": true,
        "swiftgo_eligible": true,
        "swiftgo_amount_ok": true,
        "swiftgo_category_ok": true,
        "swiftgo_max_usd": 12500,
        "swiftgo_accepted_category_codes": [
          "SALA",
          "PENS",
          "TRAD",
          "CORT",
          "BEXP",
          "SUPP",
          "DIVI",
          "BENE",
          "OTHR",
          "CHAR"
        ],
        "swiftgo_notes": [],
        "issues": [],
        "pii_note": "Payment amount is used only for SwiftGo eligibility threshold check. No party PII processed. Use synthetic amounts for testing.",
        "table_version": "ISO20022-PURPOSE-CODE-JURISDICTION-V1",
        "table_source": "BIS CPMI d218 country payment profiles (bis.org/cpmi/publ/d218.htm); SWIFT SwiftGo eligibility rules (swift.com/our-solutions/global-financial-messaging/swiftgo); ISO 20022 External Code Sets ExternalPurpose1Code and ExternalCategoryPurpose1Code",
        "regulatory_basis": "BIS CPMI d218 country payment profiles; SWIFT SwiftGo eligibility criteria; ISO 20022 ExternalPurpose1Code and ExternalCategoryPurpose1Code (iso20022.org External Code Set)"
      },
      "golden_hash": "aab7bfb13c41940f85b54162daf20da67c697d04fa0b2da54374f02e1ee4b692"
    },
    {
      "name": "india_missing_purpose_code",
      "description": "India beneficiary corridor with no purpose code supplied (mandatory per RBI FEMA) and amount above SwiftGo threshold.",
      "policy_parameters": {
        "beneficiary_country": "IN",
        "payment_amount_usd": 25000,
        "category_purpose_code": "SALA"
      },
      "output_payload": {
        "jurisdiction_requires_purpose_code": true,
        "jurisdiction_reason": "Reserve Bank of India mandates purpose code for all inward remittances (RBI FEMA).",
        "required_code_types": [
          "PurpCd"
        ],
        "code_type_required": "PurpCd",
        "purpose_code_compliant": false,
        "purpose_code_provided": false,
        "purpose_format_valid": null,
        "category_purpose_code_provided": true,
        "swiftgo_eligible": false,
        "swiftgo_amount_ok": false,
        "swiftgo_category_ok": true,
        "swiftgo_max_usd": 12500,
        "swiftgo_accepted_category_codes": [
          "SALA",
          "PENS",
          "TRAD",
          "CORT",
          "BEXP",
          "SUPP",
          "DIVI",
          "BENE",
          "OTHR",
          "CHAR"
        ],
        "swiftgo_notes": [
          "Amount USD 25000.00 exceeds SwiftGo maximum of $12500."
        ],
        "issues": [
          {
            "code": "PURPOSE_CODE_REQUIRED",
            "severity": "ERROR",
            "field": "Purp/Cd",
            "message": "Beneficiary country IN requires ExternalPurpose1Code. Reserve Bank of India mandates purpose code for all inward remittances (RBI FEMA)."
          }
        ],
        "pii_note": "Payment amount is used only for SwiftGo eligibility threshold check. No party PII processed. Use synthetic amounts for testing.",
        "table_version": "ISO20022-PURPOSE-CODE-JURISDICTION-V1",
        "table_source": "BIS CPMI d218 country payment profiles (bis.org/cpmi/publ/d218.htm); SWIFT SwiftGo eligibility rules (swift.com/our-solutions/global-financial-messaging/swiftgo); ISO 20022 External Code Sets ExternalPurpose1Code and ExternalCategoryPurpose1Code",
        "regulatory_basis": "BIS CPMI d218 country payment profiles; SWIFT SwiftGo eligibility criteria; ISO 20022 ExternalPurpose1Code and ExternalCategoryPurpose1Code (iso20022.org External Code Set)"
      },
      "golden_hash": "1c5471f266830332f4902d8f4e3d43aeb5495dc1a46d4f9f1c3dafed8be946e3"
    },
    {
      "name": "empty_input_finite",
      "description": "All inputs absent. Verifies finite output (no NaN/Infinity). Country invalid error, zero-amount SwiftGo ineligible.",
      "policy_parameters": {},
      "output_payload": {
        "jurisdiction_requires_purpose_code": false,
        "jurisdiction_reason": "No purpose code mandate identified in CPMI d218 country profiles for unknown. Verify current CPMI d218 guidance as requirements evolve.",
        "required_code_types": [],
        "code_type_required": "none",
        "purpose_code_compliant": true,
        "purpose_code_provided": false,
        "purpose_format_valid": null,
        "category_purpose_code_provided": false,
        "swiftgo_eligible": false,
        "swiftgo_amount_ok": false,
        "swiftgo_category_ok": false,
        "swiftgo_max_usd": 12500,
        "swiftgo_accepted_category_codes": [
          "SALA",
          "PENS",
          "TRAD",
          "CORT",
          "BEXP",
          "SUPP",
          "DIVI",
          "BENE",
          "OTHR",
          "CHAR"
        ],
        "swiftgo_notes": [
          "Amount not provided or zero -- SwiftGo eligibility cannot be determined.",
          "ExternalCategoryPurpose1Code (CtgyPurp/Cd) absent -- required for SwiftGo eligibility check."
        ],
        "issues": [
          {
            "code": "COUNTRY_INVALID",
            "severity": "ERROR",
            "field": "beneficiary_country",
            "message": "beneficiary_country must be a valid ISO 3166-1 alpha-2 country code."
          }
        ],
        "pii_note": "Payment amount is used only for SwiftGo eligibility threshold check. No party PII processed. Use synthetic amounts for testing.",
        "table_version": "ISO20022-PURPOSE-CODE-JURISDICTION-V1",
        "table_source": "BIS CPMI d218 country payment profiles (bis.org/cpmi/publ/d218.htm); SWIFT SwiftGo eligibility rules (swift.com/our-solutions/global-financial-messaging/swiftgo); ISO 20022 External Code Sets ExternalPurpose1Code and ExternalCategoryPurpose1Code",
        "regulatory_basis": "BIS CPMI d218 country payment profiles; SWIFT SwiftGo eligibility criteria; ISO 20022 ExternalPurpose1Code and ExternalCategoryPurpose1Code (iso20022.org External Code Set)"
      },
      "golden_hash": "f52d39b4003dab3993473973c03e4106ba610b51b72e6d00ae55108bedc55a9c"
    }
  ]
}
