Decision Engine API Guide
This guide walks the Decision Engine API in the order you’ll actually use it: set up a merchant, configure how transactions should be routed, send transactions to/decide-gateway, feed outcomes back, and review analytics.
Every page below includes ready-to-run curl examples with realistic payloads. For exact request and response schemas plus an interactive playground, use the OpenAPI Reference.
Two reference surfaces are available. Start here for task-oriented flows; switch to the OpenAPI Reference when you need exact schemas.
Integration flow
A typical integration follows these steps. Each links to the page with the exact request.1
Create a merchant
Create the merchant record that owns your routing config, API keys, and analytics.
See Create Merchant Account.
2
Create an API key
Issue a server-to-server API key to authenticate the calls that follow.
See API Keys.
3
Configure routing
Decide how connectors are chosen — a fixed connector, a priority list, a volume split, or an advanced rule tree — then activate it.
See Create Routing Algorithm.
4
Run transactions
Call
/decide-gateway for each payment to get the connector to use.
See Run Transactions.5
Send feedback
Report the authorization outcome so scoring and analytics stay accurate.
See Update Gateway Score.
6
Review analytics
Inspect gateway scores, decisions, and audit trails.
See Analytics & Audit.
Environment setup
Set these once in your shell and reuse them across every example.AUTH_HEADER:
Authentication & access
Browse by task
Health & Status
Liveness, readiness, and dependency diagnostics.
Authentication & Onboarding
Sign up, log in, switch merchants, and manage API keys.
Merchant Accounts
Create, read, delete a merchant, and manage debit routing.
Configure Routing
Single, priority, volume-split, and advanced rule trees — plus activation.
Scoring Configuration
Success-rate and elimination (downtime) scoring config.
Run Transactions
Choose a connector per payment via
/decide-gateway.Feedback & Scoring
Report authorization outcomes to keep scoring accurate.
Analytics & Audit
Overview, gateway scores, decisions, routing stats, and audit.
Multi-Objective Routing
Cost-aware post-step that re-ranks gateways on expected value.
Cost Data Ingestion
Learn real per-gateway fees from settlement reports and invoices.
A/B Testing
Compare two routing strategies on live traffic with guardrails.
Autopilot & Feature Flags
Self-tuning SR scoring, plus every merchant-level toggle.
Ways to route transactions
/decide-gateway supports several strategies, selected per request with rankingAlgorithm.
Multi-objective (cost-aware) routing is not a
rankingAlgorithm value. It is a post-step on success-rate scoring, toggled per request with enableMultiObjective or per merchant with the multi_objective_routing_enabled feature flag. When active, responses carry a multi_objective_info block. See Multi-objective routing.Advanced capabilities
Beyond the core decide/feedback loop, Decision Engine ships several self-contained systems that build on it:Backward compatibility
Legacy routes are kept for older integrations. New integrations should use/decide-gateway and /update-gateway-score.
- Legacy decision endpoint — the older
/decision_gatewayroute. - Legacy update score — the older
/update-scoreroute.