Test Spend Control Rules Evaluation
This operation can be used to evaluate spend control rules for a test transaction.
curl --request POST \
--url 'https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/spend-control/v1/evaluate/test' \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"cardId": "<string>",
"merchantCategoryCode": "<string>",
"settlementAmount": {
"amount": 3.14,
"currency": "EUR"
},
"merchantCountryCode": "FIN",
"merchantId": "<string>",
"acquirerId": "<string>",
"subMerchantId": "<string>",
"cardholderVerifications": [],
"cardholderPresent": true,
"transactionTimestamp": "2025-11-14T13:46:16.61Z",
"transactionId": "<string>",
"terminalCategoryCode": "<string>"
}
'import requests
url = "https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/spend-control/v1/evaluate/test"
payload = {
"cardId": "<string>",
"merchantCategoryCode": "<string>",
"settlementAmount": {
"amount": 3.14,
"currency": "EUR"
},
"merchantCountryCode": "FIN",
"merchantId": "<string>",
"acquirerId": "<string>",
"subMerchantId": "<string>",
"cardholderVerifications": [],
"cardholderPresent": True,
"transactionTimestamp": "2025-11-14T13:46:16.61Z",
"transactionId": "<string>",
"terminalCategoryCode": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cardId: '<string>',
merchantCategoryCode: '<string>',
settlementAmount: {amount: 3.14, currency: 'EUR'},
merchantCountryCode: 'FIN',
merchantId: '<string>',
acquirerId: '<string>',
subMerchantId: '<string>',
cardholderVerifications: [],
cardholderPresent: true,
transactionTimestamp: '2025-11-14T13:46:16.61Z',
transactionId: '<string>',
terminalCategoryCode: '<string>'
})
};
fetch('https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/spend-control/v1/evaluate/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/spend-control/v1/evaluate/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cardId' => '<string>',
'merchantCategoryCode' => '<string>',
'settlementAmount' => [
'amount' => 3.14,
'currency' => 'EUR'
],
'merchantCountryCode' => 'FIN',
'merchantId' => '<string>',
'acquirerId' => '<string>',
'subMerchantId' => '<string>',
'cardholderVerifications' => [
],
'cardholderPresent' => true,
'transactionTimestamp' => '2025-11-14T13:46:16.61Z',
'transactionId' => '<string>',
'terminalCategoryCode' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/spend-control/v1/evaluate/test"
payload := strings.NewReader("{\n \"cardId\": \"<string>\",\n \"merchantCategoryCode\": \"<string>\",\n \"settlementAmount\": {\n \"amount\": 3.14,\n \"currency\": \"EUR\"\n },\n \"merchantCountryCode\": \"FIN\",\n \"merchantId\": \"<string>\",\n \"acquirerId\": \"<string>\",\n \"subMerchantId\": \"<string>\",\n \"cardholderVerifications\": [],\n \"cardholderPresent\": true,\n \"transactionTimestamp\": \"2025-11-14T13:46:16.61Z\",\n \"transactionId\": \"<string>\",\n \"terminalCategoryCode\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/spend-control/v1/evaluate/test")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"cardId\": \"<string>\",\n \"merchantCategoryCode\": \"<string>\",\n \"settlementAmount\": {\n \"amount\": 3.14,\n \"currency\": \"EUR\"\n },\n \"merchantCountryCode\": \"FIN\",\n \"merchantId\": \"<string>\",\n \"acquirerId\": \"<string>\",\n \"subMerchantId\": \"<string>\",\n \"cardholderVerifications\": [],\n \"cardholderPresent\": true,\n \"transactionTimestamp\": \"2025-11-14T13:46:16.61Z\",\n \"transactionId\": \"<string>\",\n \"terminalCategoryCode\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/spend-control/v1/evaluate/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cardId\": \"<string>\",\n \"merchantCategoryCode\": \"<string>\",\n \"settlementAmount\": {\n \"amount\": 3.14,\n \"currency\": \"EUR\"\n },\n \"merchantCountryCode\": \"FIN\",\n \"merchantId\": \"<string>\",\n \"acquirerId\": \"<string>\",\n \"subMerchantId\": \"<string>\",\n \"cardholderVerifications\": [],\n \"cardholderPresent\": true,\n \"transactionTimestamp\": \"2025-11-14T13:46:16.61Z\",\n \"transactionId\": \"<string>\",\n \"terminalCategoryCode\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"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",
"defaultParameters": {
"amount": 100,
"shouldTriggerPartialApproval": "false"
},
"id": "<string>",
"ruleType": "DECLINE",
"filters": [
{
"parameters": {
"items": [
"<string>"
]
},
"id": "<string>",
"type": "MCC",
"reversed": true
}
]
}
}
]
}
]
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Query Parameters
The audit user to log the request
Body
Amount including currency
Show child attributes
Show child attributes
The transaction type.
RETAIL, ATM, UNIQUE, CASH_DISBURSEMENT, BALANCE_INQUIRY, P2P_DEBIT, P2P_CREDIT, CREDIT, CASHBACK A valid ISO-3166-1 alpha-3 country code.
"FIN"
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.
WALLET, PIN, BIO, THREE_DS 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 terminalCONTACTLESS- 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.
UNKNOWN, MANUAL_ENTRY, MAGNETIC_STRIPE_READ, CHIP_READ, CONTACTLESS, ELECTRONIC_COMMERCE VISA, MC REQUEST, ADJUSTMENT, SCHEME_ADVICE, REVERSAL_ADVICE "2025-11-14T13:46:16.61Z"
Was this page helpful?
curl --request POST \
--url 'https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/spend-control/v1/evaluate/test' \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"cardId": "<string>",
"merchantCategoryCode": "<string>",
"settlementAmount": {
"amount": 3.14,
"currency": "EUR"
},
"merchantCountryCode": "FIN",
"merchantId": "<string>",
"acquirerId": "<string>",
"subMerchantId": "<string>",
"cardholderVerifications": [],
"cardholderPresent": true,
"transactionTimestamp": "2025-11-14T13:46:16.61Z",
"transactionId": "<string>",
"terminalCategoryCode": "<string>"
}
'import requests
url = "https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/spend-control/v1/evaluate/test"
payload = {
"cardId": "<string>",
"merchantCategoryCode": "<string>",
"settlementAmount": {
"amount": 3.14,
"currency": "EUR"
},
"merchantCountryCode": "FIN",
"merchantId": "<string>",
"acquirerId": "<string>",
"subMerchantId": "<string>",
"cardholderVerifications": [],
"cardholderPresent": True,
"transactionTimestamp": "2025-11-14T13:46:16.61Z",
"transactionId": "<string>",
"terminalCategoryCode": "<string>"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cardId: '<string>',
merchantCategoryCode: '<string>',
settlementAmount: {amount: 3.14, currency: 'EUR'},
merchantCountryCode: 'FIN',
merchantId: '<string>',
acquirerId: '<string>',
subMerchantId: '<string>',
cardholderVerifications: [],
cardholderPresent: true,
transactionTimestamp: '2025-11-14T13:46:16.61Z',
transactionId: '<string>',
terminalCategoryCode: '<string>'
})
};
fetch('https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/spend-control/v1/evaluate/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/spend-control/v1/evaluate/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cardId' => '<string>',
'merchantCategoryCode' => '<string>',
'settlementAmount' => [
'amount' => 3.14,
'currency' => 'EUR'
],
'merchantCountryCode' => 'FIN',
'merchantId' => '<string>',
'acquirerId' => '<string>',
'subMerchantId' => '<string>',
'cardholderVerifications' => [
],
'cardholderPresent' => true,
'transactionTimestamp' => '2025-11-14T13:46:16.61Z',
'transactionId' => '<string>',
'terminalCategoryCode' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/spend-control/v1/evaluate/test"
payload := strings.NewReader("{\n \"cardId\": \"<string>\",\n \"merchantCategoryCode\": \"<string>\",\n \"settlementAmount\": {\n \"amount\": 3.14,\n \"currency\": \"EUR\"\n },\n \"merchantCountryCode\": \"FIN\",\n \"merchantId\": \"<string>\",\n \"acquirerId\": \"<string>\",\n \"subMerchantId\": \"<string>\",\n \"cardholderVerifications\": [],\n \"cardholderPresent\": true,\n \"transactionTimestamp\": \"2025-11-14T13:46:16.61Z\",\n \"transactionId\": \"<string>\",\n \"terminalCategoryCode\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/spend-control/v1/evaluate/test")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"cardId\": \"<string>\",\n \"merchantCategoryCode\": \"<string>\",\n \"settlementAmount\": {\n \"amount\": 3.14,\n \"currency\": \"EUR\"\n },\n \"merchantCountryCode\": \"FIN\",\n \"merchantId\": \"<string>\",\n \"acquirerId\": \"<string>\",\n \"subMerchantId\": \"<string>\",\n \"cardholderVerifications\": [],\n \"cardholderPresent\": true,\n \"transactionTimestamp\": \"2025-11-14T13:46:16.61Z\",\n \"transactionId\": \"<string>\",\n \"terminalCategoryCode\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/spend-control/v1/evaluate/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cardId\": \"<string>\",\n \"merchantCategoryCode\": \"<string>\",\n \"settlementAmount\": {\n \"amount\": 3.14,\n \"currency\": \"EUR\"\n },\n \"merchantCountryCode\": \"FIN\",\n \"merchantId\": \"<string>\",\n \"acquirerId\": \"<string>\",\n \"subMerchantId\": \"<string>\",\n \"cardholderVerifications\": [],\n \"cardholderPresent\": true,\n \"transactionTimestamp\": \"2025-11-14T13:46:16.61Z\",\n \"transactionId\": \"<string>\",\n \"terminalCategoryCode\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"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",
"defaultParameters": {
"amount": 100,
"shouldTriggerPartialApproval": "false"
},
"id": "<string>",
"ruleType": "DECLINE",
"filters": [
{
"parameters": {
"items": [
"<string>"
]
},
"id": "<string>",
"type": "MCC",
"reversed": true
}
]
}
}
]
}
]
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"errorCode": "<string>",
"errorType": "STATIC_VALIDATION_ERROR",
"errorReason": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
