---
title: "Test Spend Control Rules Evaluation"
method: POST
path: "/v1/evaluate/test"
tags: ["Spend Control Test Endpoint"]
---

# Test Spend Control Rules Evaluation

`POST /v1/evaluate/test`

This operation can be used to evaluate spend control rules for a test transaction.

## Query parameters

- `auditUser` string, required

## Request body

- TestEvaluationV1Request
  - `cardId` string, biginteger, required
  - `merchantCategoryCode` string, required
  - `settlementAmount` Money, required — Amount including currency
    - `amount` number
    - `currency` string — A valid ISO 4217 currency code
  - `merchantCountryCode` string, iso3166-1-countrycode — A valid ISO-3166-1 alpha-3 country code.
  - `merchantId` string
  - `acquirerId` string
  - `subMerchantId` string
  - `cardholderVerifications` CardholderVerificationType[]
  - `cardEntryMode` 'MANUAL_ENTRY' | 'MAGNETIC_STRIPE_READ' | 'CHIP_READ' | 'CONTACTLESS' | 'ELECTRONIC_COMMERCE' — Describes how the card credentials were captured. Possible values: * `MANUAL_ENTRY` - the card credentials were manually entered by the merchant. * `MAGNETIC_STRIPE_READ` - the magnetic stripe of the card was read by a terminal. * `CHIP_READ` - the EMV chip of the card was read by a terminal * `CONTACTLESS` - contactless transactions, i.e. the card credentials were read with near field communication (NFC) either from chip or digital wallet. * `ELECTRONIC_COMMERCE` - the cardholder entered the card credentials as an e-com merchant.
  - `cardholderPresent` boolean
  - `transactionType` 'RETAIL' | 'CASH' | 'ATM' | 'CREDIT' | 'UNIQUE' | 'P2P_CREDIT' | 'P2P_DEBIT' | 'BALANCE_INQUIRY' | 'CASH_DISBURSEMENT', required — The transaction type. The only fully supported type is RETAIL. Other transaction types may be used, but no guarantees are made about their behaviour. Some transaction types have specific limitations: * `ATM` - In order to create ATM transactions, `merchantData.merchantCategoryCode` must be `6011`. This behaviour is downstream from the VISA and MC authorization systems. If a different code is used, transactions will be treated as `CASH`
  - `cardScheme` 'VISA' | 'MC'
  - `messageCategory` 'REQUEST' | 'ADJUSTMENT' | 'SCHEME_ADVICE' | 'REVERSAL_ADVICE'
  - `transactionTimestamp` string, date-time
  - `transactionId` string, biginteger
  - `terminalCategoryCode` string

## Response `200`

Successful rules evaluation

- TestEvaluationV1Response
  - `decision` 'DECLINE' | 'APPROVE_PARTIAL' | 'APPROVE' — Spend control decision
  - `partialApprovalAmount` Money — Amount including currency
    - `amount` number
    - `currency` string — A valid ISO 4217 currency code
  - `responseCode` string
  - `details` SpendControlRuleSetEvaluationDetails[]
    - `ruleSetId` string, biginteger
    - `operator` 'ANY' | 'ALL' — Defines whether all rules should pass or if it's enough for just one rule to pass.
    - `decision` 'DECLINE' | 'APPROVE_PARTIAL' | 'APPROVE' — Spend control decision
    - `entityReferences` ExternalEntityReference[]
      - `id` string, required
      - `type` 'CARD' | 'CARD_HIERARCHY_GROUP', required
    - `partialApprovalAmount` Money — Amount including currency
      - `amount` number
      - `currency` string — A valid ISO 4217 currency code
    - `ruleEvaluations` SpendControlRuleEvaluation[]
      - `ruleId` string, biginteger
      - `decision` 'DECLINE' | 'APPROVE_PARTIAL' | 'APPROVE' — Spend control decision
      - `partialApprovalAmount` Money — Amount including currency
        - `amount` number
        - `currency` string — A valid ISO 4217 currency code
      - `settings` RuleResponseBody
        - `id` string, biginteger
        - `ruleType` 'DECLINE' | 'ALLOWED_MCC' | 'BLOCKED_MCC' | 'ALLOWED_MERCHANT_ID' | 'BLOCKED_MERCHANT_ID' | 'AMOUNT' | 'ALLOWED_MERCHANT_COUNTRY' | 'BLOCKED_MERCHANT_COUNTRY' | 'ALLOWED_CARD_ENTRY_MODES' | 'BLOCKED_CARD_ENTRY_MODES' | 'ALLOWED_CVM' | 'BLOCKED_CVM' | 'CARDHOLDER_PRESENT' | 'EXTERNAL_BALANCE_CHECK' | 'CUMULATIVE_AMOUNT_INDIVIDUAL_LIMITS' | 'CUMULATIVE_COUNT_INDIVIDUAL_LIMITS' | 'ENFUCE_INTERNAL_PSD2_PIN_COUNT_RULE' | 'ENFUCE_INTERNAL_PSD2_PIN_AMOUNT_RULE' — ### DECLINE Always declines. Should be used together with filters. Parameters: None ### ALLOWED_MCC Approves if MCC in request is in parameter list. Otherwise declines. Parameters: List of MCC codes ### BLOCKED_MCC Declines if MCC in request is in parameter list. Otherwise approves. Parameters: List of MCC codes ### ALLOWED_MERCHANT_ID Approves if merchant id in request is in parameter list. Otherwise declines. Parameters: List of merchant ids ### BLOCKED_MERCHANT_ID Declines if merchant id in request is in parameter list. Otherwise approves. Parameters: List of merchant ids ### AMOUNT Declines if amount in request is greater than the parameter. Otherwise approves. Parameters: Single element containing floating number ### ALLOWED_MERCHANT_COUNTRY Approves if country code in request is not present or is in parameter list. Otherwise declines. Parameters: List of country codes ### BLOCKED_MERCHANT_COUNTRY Declines if country code in request is present and is in parameter list. Otherwise approves. Parameters: List of country codes ### BLOCKED_CARD_ENTRY_MODES Declines if card entry mode code in request is present and is in parameter list. Otherwise approves. Parameters: List of card entry mode codes ### ALLOWED_CARD_ENTRY_MODES Approves if card entry mode code in request is present and is in parameter list. Otherwise declines. Parameters: List of card entry mode codes ### ALLOWED_CVM Approves if cardholder verification code in request is present and is in parameter list. Otherwise declines. Parameters: List of cardholder verification codes ### BLOCKED_CVM Declines if cardholder verification code in request is present and is in parameter list. Otherwise approves. Parameters: List of cardholder verification codes ### EXTERNAL_BALANCE_CHECK Declines if account balance is lower than transaction amount. Otherwise approves. Parameters: None ### CUMULATIVE_AMOUNT_INDIVIDUAL_LIMITS - Work in Progress Declines if cumulative amount over the defined period of time exceeds the parameter. Otherwise approves. Parameters: Single element containing floating number (limit), enumerated period of time string and single element elaborating on the period length for rolling periods ### CUMULATIVE_COUNT_INDIVIDUAL_LIMITS - Work in Progress Declines if cumulative count over the defined period of time exceeds the parameter. Otherwise approves. Parameters: Single element containing floating number (limit), enumerated period of time string and single element elaborating on the period length for rolling periods ### ENFUCE_INTERNAL_PSD2_PIN_COUNT_RULE This ruleType is for internal enfuce use only ### ENFUCE_INTERNAL_PSD2_PIN_AMOUNT_RULE This ruleType is for internal enfuce use only
        - `name` string, required
        - `filterOperatorType` 'ANY' | 'ALL', required — Defines whether all filters should match or if it's for just one filter to pass.
        - `filters` FilterResponseBody[]
          - `id` string, biginteger
          - `type` 'MCC' | 'AMOUNT' | 'MERCHANT_COUNTRY' | 'CARDHOLDER_VERIFICATION' | 'CARD_ENTRY_MODE' | 'CARDHOLDER_PRESENT' | 'ACQUIRER_ID' | 'TRANSACTION_TYPE' — ### MCC Matches if MCC in request is in parameter list. Parameters: List of MCC codes ### Amount Matches if amount is greater than the parameter. Parameters: Single element containing floating number ### MERCHANT_COUNTRY Matches if country code is in parameter list. Parameters: List of country codes ### CARDHOLDER_VERIFICATION Matches if cardholder verification is in parameter list. Parameters: List of cardholder verifications ### CARD_ENTRY_MODE Matches if card entry mode is in parameter list. Parameters: List of card entry modes ### CARDHOLDER_PRESENT Parameters: boolean value ### ACQUIRER_ID Matches if acquirer id is in parameter list. Parameters: List of acquirer ids ### TRANSACTION_TYPE Matches if transaction type is in parameter list. Parameters: List of transaction types
          - `reversed` boolean

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `500` — Internal server error

---

[API](https://skmtc.net/enfuce/apis/transfer-api.md) · [All operations](https://skmtc.net/enfuce/apis/transfer-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/enfuce/transfer-api/revisions/dc4a41118f80/schema)
