Skip to main content

Order Fraud API

Submit orders for real-time fraud scoring, manage anonymous profiles, and monitor cashier activity.

Profiles

Create/Update Profile

POST /v1/profiles

Creates or updates an anonymous integration profile. If the external_id already exists for your org, the profile is updated (last_seen_at bumped, device linked).

Auth: API Key (X-API-Key header)

curl -X POST https://api.simplr-ai.com/v1/profiles \
-H "X-API-Key: sk_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"external_id": "user-abc-123",
"profile_type": "customer",
"fingerprint_hash": "a1b2c3d4e5..."
}'
FieldTypeRequiredDescription
external_idstringYesYour internal user identifier (max 512 chars)
profile_typestringNocustomer, cashier, employee, system (default: customer)
fingerprint_hashstringNoDevice fingerprint hash (links device to profile)
ip_hashstringNoHashed IP address for location context
country_codestringNoISO 2-letter country code
latitudenumberNoLatitude (-90 to 90)
longitudenumberNoLongitude (-180 to 180)

Response:

{
"success": true,
"message": "Profile upserted",
"content": {
"profile": {
"id": "uuid",
"external_id": "user-abc-123",
"profile_type": "customer",
"status": "active",
"risk_score": 0,
"risk_level": "low",
"device_count": 1,
"total_orders": 0
},
"is_new": true,
"device_linked": true,
"device_anomaly": null
}
}
Device Anomaly

If device_anomaly is non-null, it describes a suspicious device pattern (e.g., "Profile seen on 5 new devices in 24h").


Orders

Submit Order

POST /v1/orders

Submit an order for real-time fraud scoring. Returns immediately with a risk assessment.

Auth: API Key (X-API-Key header)

curl -X POST https://api.simplr-ai.com/v1/orders \
-H "X-API-Key: sk_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"external_order_id": "ORD-2026-001",
"external_id": "user-abc-123",
"amount_cents": 15999,
"currency": "ZAR",
"order_type": "online",
"payment_method": "card",
"location_latitude": -33.92,
"location_longitude": 18.42,
"fingerprint_hash": "a1b2c3d4e5..."
}'
FieldTypeRequiredDescription
external_order_idstringYesYour internal order ID (unique per org)
external_idstringNoProfile external_id (omit for anonymous POS orders)
amount_centsintegerYesOrder total in cents
currencystringNoISO 4217 currency code (default: USD)
order_typestringNoonline, in_store, phone, other
payment_methodstringNocard, cash, mobile, crypto, other
item_countintegerNoNumber of items
location_latitudenumberNoOrder location latitude
location_longitudenumberNoOrder location longitude
location_countrystringNoCountry name
location_citystringNoCity name
location_namestringNoStore/location name
fingerprint_hashstringNoDevice fingerprint hash
ip_hashstringNoHashed IP address
edge_device_idstringNoPOS device ID (for in_store orders)
cashier_external_idstringNoCashier profile external_id
ordered_atstringNoISO 8601 datetime (defaults to now)
itemsarrayNoOrder line items (max 500)

Order Item Object:

FieldTypeRequiredDescription
external_item_idstringNoYour item ID
item_categorystringNoItem category
quantityintegerYesQuantity
unit_price_centsintegerYesUnit price in cents
total_price_centsintegerYesLine total in cents
discount_centsintegerNoDiscount amount in cents
discount_typestringNonone, percentage, fixed, override, employee

Response:

{
"success": true,
"content": {
"order": {
"id": "uuid",
"external_order_id": "ORD-2026-001",
"status": "pending",
"ordered_at": "2026-04-13T10:30:00Z"
},
"risk": {
"risk_score": 67,
"risk_level": "high",
"signals": {
"velocity": 15,
"amount_anomaly": 18,
"location_anomaly": 12,
"device_anomaly": 10,
"time_anomaly": 7,
"pattern": 5
},
"flags": ["high_velocity", "amount_anomaly", "location_anomaly"],
"flagged_for_review": true
}
}
}

Bulk Submit Orders

POST /v1/orders/bulk

Submit up to 100 orders in a single request.

curl -X POST https://api.simplr-ai.com/v1/orders/bulk \
-H "X-API-Key: sk_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"orders": [
{ "external_order_id": "ORD-001", "amount_cents": 5000, ... },
{ "external_order_id": "ORD-002", "amount_cents": 12000, ... }
]
}'

Cashier Actions

Submit Cashier Action

POST /v1/cashier/actions

Record a cashier action (void, refund, discount override, etc.) for fraud monitoring.

Auth: API Key (X-API-Key header)

curl -X POST https://api.simplr-ai.com/v1/cashier/actions \
-H "X-API-Key: sk_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"cashier_external_id": "cashier-jane",
"action_type": "void",
"edge_device_id": "pos-terminal-42",
"amount_cents": 4500,
"reason": "Customer changed mind"
}'
FieldTypeRequiredDescription
cashier_external_idstringYesCashier profile external_id
action_typestringYesSee action types below
edge_device_idstringNoPOS device ID
order_external_idstringNoRelated order ID
amount_centsintegerNoAmount in cents
reasonstringNoReason for the action (max 1000 chars)
performed_atstringNoISO 8601 datetime (defaults to now)

Action Types:

TypeDescription
voidCancel a transaction
refundRefund a previous transaction
discount_overrideOverride an item's discount
price_overrideOverride an item's price
no_saleOpen cash drawer without a sale
cash_dropRemove cash from drawer to safe
cash_pickupManager cash pickup
drawer_openOpen drawer (other reason)
shift_startCashier clocks in
shift_endCashier clocks out

Response:

{
"success": true,
"content": {
"action": {
"id": "uuid",
"action_type": "void",
"amount_cents": 4500,
"performed_at": "2026-04-13T14:30:00Z"
},
"fraud": {
"risk_score": 35,
"risk_level": "medium",
"signals": {
"excessive_voids": 15,
"excessive_refunds": 0,
"discount_abuse": 0,
"off_shift": 0,
"velocity_anomaly": 10,
"drawer_anomaly": 0,
"round_number_refund": 0
},
"flags": ["excessive_voids"]
}
}
}

Risk Scores

All risk scores follow the same 0-100 scale:

LevelScore RangeMeaning
low0-24Normal activity
medium25-49Slightly unusual, monitor
high50-69Suspicious, review recommended
critical70-100Likely fraud, immediate action needed

Orders scoring 50+ are automatically flagged for review in the dashboard.

Fraud Flags

When an order or action triggers specific fraud patterns, flags are returned:

FlagMeaning
high_velocityToo many orders in a short time window
amount_anomalyAmount significantly deviates from baseline
location_anomalyUnusual location or impossible travel
device_anomalyMultiple new devices or device sharing
time_anomalyActivity outside typical hours
pattern_anomalyCross-org flags or suspicious payment changes
excessive_voidsCashier void count far above average
excessive_refundsCashier refund count far above average
discount_abuseCashier discount rate far above average
off_shift_activityTransaction outside shift hours
drawer_anomalyToo many no-sale drawer opens
round_number_refundRound-amount refund without matching order

Webhook Events

EventPayload
order.fraud.detectedFired when an order scores 50+ risk
order.fraud.alertFired when a pattern-based alert is created
profile.risk.changedFired when a profile's risk level changes
cashier.fraud.detectedFired when a cashier action triggers fraud flags

Billing

Each order submitted via POST /v1/orders consumes 1 credit. Cashier actions (POST /v1/cashier/actions) and profile creation (POST /v1/profiles) are free. Credits are deducted from your org balance every 5 minutes.