Request
SendPOST /api/decisions with the decisions:create scope. Three domains are required; everything else
enriches the evaluation and is forwarded to backends where applicable.
The payment credential.
type is pan, masked_pan, or sepa — see
Credential types.Must include
id. May include email and date_of_birth.reference, amount (minor units), and currency (ISO 4217).ip, fingerprint, user_agent, session, and language.Billing address, forwarded to applicable backends.
Shipping address, forwarded to applicable backends.
Cart line items; each requires at least
name or sku.Travel data — passengers and legs — forwarded to backends that consume it.
Flat string key-value pairs, available to rules as
$.metadata.*. Never
forwarded to backends.Selects the active ruleset to evaluate.
The complete request and response schema, including every nested field, is in
the API
reference.
Credential types
- pan
- masked_pan
- sepa
Full card number. Used to evaluate the transaction and compute the credential fingerprint; never persisted.
Example request
Response
Specter returns the decision together with the rules that fired and any backend results.Unique decision identifier.
ALLOW, REVIEW, BLOCK, or PROVISIONAL — see
Outcomes. PROVISIONAL only occurs with asynchronous backend
groups (Specter Connect).The ruleset context that was evaluated.
Deterministic HMAC-SHA256 identifier for the card instrument.
The credential type supplied —
pan, masked_pan, or sepa.Display-safe masked representation, e.g.
411111 ****** 4242.Rules that fired, in evaluation order.
One entry per backend rule executed, including any error such as
insufficient_context. Present only on Specter Connect.null until a REVIEW decision is closed — see
Resolving a REVIEW decision.Example response
Use cases
Synchronous pre-authorization decision
Specter returns a definitive decision in one call. Simplest to integrate, and the right default when the added latency of any backends is acceptable.- The merchant requests a decision from Specter.
- Specter applies all rules and, where required, reaches out to backends.
- The merchant uses the definitive result to authorize the payment.
Asynchronous decision with delayed capture
For latency-sensitive flows, Specter returns a fastPROVISIONAL result from local rules and finishes the
backend evaluation in the background. The merchant authorizes optimistically and defers the capture until the
final decision arrives.
- The merchant requests a decision from Specter.
- Specter applies all local rules and returns a
PROVISIONALresult immediately. - The merchant optimistically authorizes and defers the capture.
- Specter reaches out to backends asynchronously.
- Specter notifies the merchant of the definitive decision through a registered webhook.
- The merchant captures or cancels the authorization based on the final decision.
Related
Decisions
Outcomes, the decision log, and resolving REVIEW decisions.
Rule engine
How your request is evaluated into a decision.