Skip to main content
POST
/
v1
/
evaluate
/
test
Test Spend Control Rules Evaluation
curl --request POST \
  --url 'https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/spend-control/v1/evaluate/test' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "cardId": "<string>",
  "merchantCategoryCode": "<string>",
  "settlementAmount": {
    "amount": 3.14,
    "currency": "EUR"
  },
  "transactionType": "RETAIL",
  "merchantCountryCode": "FIN",
  "merchantId": "<string>",
  "acquirerId": "<string>",
  "subMerchantId": "<string>",
  "cardholderVerifications": [
    "WALLET"
  ],
  "cardEntryMode": "UNKNOWN",
  "cardholderPresent": true,
  "cardScheme": "VISA",
  "messageCategory": "REQUEST"
}
'
{
  "decision": "DECLINE",
  "partialApprovalAmount": {
    "amount": 3.14,
    "currency": "EUR"
  },
  "responseCode": "<string>",
  "details": [
    {
      "ruleSetId": "<string>",
      "operator": "ANY",
      "decision": "DECLINE",
      "entityReferences": [
        {
          "id": "<string>",
          "type": "CARD"
        }
      ],
      "partialApprovalAmount": {
        "amount": 3.14,
        "currency": "EUR"
      },
      "ruleEvaluations": [
        {
          "ruleId": "<string>",
          "decision": "DECLINE",
          "partialApprovalAmount": {
            "amount": 3.14,
            "currency": "EUR"
          },
          "settings": {
            "name": "<string>",
            "filterOperatorType": "ANY",
            "id": "<string>",
            "ruleType": "DECLINE",
            "filters": [
              {
                "id": "<string>",
                "type": "MCC",
                "reversed": true
              }
            ]
          }
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

auditUser
string
required

The audit user to log the request

Body

application/json
cardId
string<biginteger>
required
merchantCategoryCode
string
required
settlementAmount
object
required

Amount including currency

transactionType
enum<string>
required

The transaction type.

Available options:
RETAIL,
ATM,
UNIQUE,
CASH_DISBURSEMENT,
BALANCE_INQUIRY,
P2P_DEBIT,
P2P_CREDIT,
CREDIT,
CASHBACK
merchantCountryCode
string<iso3166-1-countrycode>

A valid ISO-3166-1 alpha-3 country code.

Example:

"FIN"

merchantId
string
acquirerId
string
subMerchantId
string
cardholderVerifications
enum<string>[]

Describes what method was used to verify the cardholder. The verification methods are limited to verification methods that are considered as valid verification methods according to strong customer authentication principles. Possible values: * WALLET - cardholder has been verified with the digital wallet device. * PIN - cardholder has entered the correct PIN of the card to the payment terminal. * BIO - cardholder has successfully been verified through a biometric method (e.g. fingerprint reader on card). * THREE_DS - cardholder has successfully been verified through 3DS.

Available options:
WALLET,
PIN,
BIO,
THREE_DS
cardEntryMode
enum<string>

Describes how the card credentials were captured. Possible values:

  • UNKNOWN - the message from the merchant did not include a distinct method.
  • 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.
Available options:
UNKNOWN,
MANUAL_ENTRY,
MAGNETIC_STRIPE_READ,
CHIP_READ,
CONTACTLESS,
ELECTRONIC_COMMERCE
cardholderPresent
boolean
cardScheme
enum<string>
Available options:
VISA,
MC
messageCategory
enum<string>
Available options:
REQUEST,
ADJUSTMENT,
SCHEME_ADVICE,
REVERSAL_ADVICE

Response

Successful rules evaluation

decision
enum<string>

Spend control decision

Available options:
DECLINE,
APPROVE_PARTIAL,
APPROVE
partialApprovalAmount
object

Amount including currency

responseCode
string
details
object[]