Money Rules
Declarative if-this-then-that on reconciled deposits.
Declarative if-this-then-that on reconciled deposits: e.g. overpaid → hold, high-risk → hold, any → notify. Rules react to the outcome; they never change how a deposit is classified.
Evaluated after reconciliation commits
Rules run post-commit and are fully isolated — a rule can't corrupt or change the reconciliation verdict. Actions reuse existing primitives (Hold → escrow, Notify → webhook event).
Thresholds are typed
thresholdKobo gates amount triggers (Overpaid/Underpaid); minRiskScore (0–100) gates HighRisk. A rule only fires when its gate is met.Refund an overpayment via Hold → approve
Rule actions are Hold / Notify / ReviewFlag — there is no auto-refund action. The recommended pattern for duplicate/over payments is
Overpaid → Hold (parks the surplus), then approve a refund with POST /transactions/{reference}/refund (see Transactions).get
/api/v1/rulesGET /api/v1/rules
Requires Bearer token
Responses
200OK
GET /api/v1/rules
curl -X GET "https://api.xental.online/api/v1/rules" \
-H "Authorization: Bearer <API_TOKEN>"post
/api/v1/rulesPOST /api/v1/rules
Requires Bearer token
Body parameters
triggerstringoptionalactionstringoptionalthresholdKobointegeroptionalminRiskScoreintegeroptionalpriorityintegeroptionalResponses
201Created
POST /api/v1/rules
curl -X POST "https://api.xental.online/api/v1/rules" \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"priority": 0
}'Example request body
{
"priority": 0
}delete
/api/v1/rules/{id}DELETE /api/v1/rules/{id}
Requires Bearer token
Path parameters
idstringrequiredResponses
204No Content
DELETE /api/v1/rules/{id}
curl -X DELETE "https://api.xental.online/api/v1/rules/:id" \
-H "Authorization: Bearer <API_TOKEN>"