Evaluate transaction
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
mode |
query | string | No | one of pre, post · default "pre" |
Request
Content type: application/json · required
| Field | Type | Required | Description |
|---|---|---|---|
external_id |
string | Yes | — |
type |
string | No | — |
direction |
string | No | — |
amount |
object | No | — |
beneficiary |
object | No | — |
customer_id |
string | No | — |
curl -X POST "$MONICHEK_API/transactions?mode=pre" \
-H "Authorization: Bearer $MONICHEK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"external_id": "id_01M3R...",
"type": "person",
"direction": "string",
"amount": {},
"beneficiary": {},
"customer_id": "cus_01M3R..."
}'const res = await fetch(`${MONICHEK_API}/transactions?mode=pre`, {
method: "POST",
headers: {
Authorization: `Bearer ${MONICHEK_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"external_id": "id_01M3R...",
"type": "person",
"direction": "string",
"amount": {},
"beneficiary": {},
"customer_id": "cus_01M3R..."
}),
});
const data = await res.json();import os
import requests
res = requests.post(
f"{os.environ['MONICHEK_API']}/transactions?mode=pre",
headers={"Authorization": f"Bearer {os.environ['MONICHEK_API_KEY']}"},
json={
"external_id": "id_01M3R...",
"type": "person",
"direction": "string",
"amount": {},
"beneficiary": {},
"customer_id": "cus_01M3R..."
},
)
print(res.json())$ch = curl_init(getenv('MONICHEK_API') . '/transactions?mode=pre');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('MONICHEK_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'external_id' => 'id_01M3R...',
'type' => 'person',
'direction' => 'string',
'amount' => [],
'beneficiary' => [],
'customer_id' => 'cus_01M3R...',
]),
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;Responses
200 OK
decision (§14.4)
application/json
{
"object": "decision",
"id": "txn_01M3R...",
"decision": "HOLD",
"hold_state": "held",
"score": 60,
"risk_rating": "low",
"reason_codes": [
"TM-FIXTURE-HOLD"
],
"triggered_rules": [],
"rule_set_version": 0,
"source": "transaction",
"degraded": false,
"latency_ms": 1,
"decision_id": "dec_01M3R...",
"alert_ids": [
"alt_01M3R..."
],
"screening": {}
}Error responses
| Status | Meaning | Body |
|---|---|---|
| 401 | Unauthorized | RFC 9457 problem |
| 422 | Unprocessable Entity | RFC 9457 problem |
Errors use the RFC 9457 problem format with a stable code.