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.
object
required
The payment credential.
type is pan, masked_pan, sepa, or paypal — see
Credential types.object
required
Must include
id. May include email and date_of_birth.object
required
reference, amount (minor units), and currency (ISO 4217).object
ip, fingerprint, user_agent, session, and language.object
Billing address, forwarded to applicable backends.
object
Shipping address, forwarded to applicable backends.
array
Cart line items; each requires at least
name or sku.object
Travel data — passengers and legs — forwarded to backends that consume it.
object
Flat string key-value pairs, available to rules as
$.metadata.*. Forwarded to
backends and stored on the decision record, so treat it as data you share with
your backend providers.string
default:"default"
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
- paypal
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.string
Unique decision identifier.
string
ALLOW, REVIEW, BLOCK, or PROVISIONAL — see
Outcomes. PROVISIONAL only occurs with asynchronous backend
groups.string
The ruleset context that was evaluated.
string
Deterministic HMAC-SHA256 identifier for the payment credential. For
paypal it is computed from the
payer_id.string
The credential type supplied —
pan, masked_pan, sepa, or paypal.string
Display-safe masked representation, e.g.
411111 •••••• 4242 for cards or s•••@example.com for PayPal.array
Rules that fired, in evaluation order.
array
One entry per backend rule executed, including any error such as
insufficient_context. Present when the ruleset includes backend rules.object
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.