Engineering

Fraud API integration: a server-side checklist

Bind risk evidence to the protected action, handle missing results and make retries safe.

Fraud API integration: a server-side checklist
A practical field note from Shield for Business.

A fraud API integration should bind a vendor assessment to the exact server-side action it protects. Keep credentials on the server, verify the event’s identity and timing, handle missing results explicitly, and make repeated requests safe. A browser-displayed risk score is useful for a demonstration but cannot authorize a production benefit or payment by itself.

Start with the event contract

Write down the protected action, the authenticated account, the client observation reference and the server decision reference. Decide when each value is created and which service can trust it. A collector’s event identifier is evidence to retrieve and validate; an arbitrary identifier supplied by the browser is not sufficient proof that the event belongs to the current action.

Read the selected vendor’s current server integration instructions. Some products retrieve a collected event, others evaluate a server request, and some use both. Use the documented association, freshness and integrity controls for that product rather than assuming every vendor implements the same contract.

Keep authorization at the backend

The OWASP REST Security Cheat Sheet covers access control, transport security and API handling. Apply those foundations to both your own endpoint and the vendor connection. Restrict server credentials, validate input and keep sensitive data out of unnecessary logs.

For a benefit claim, the server should check authentication and eligibility, obtain or validate the risk evidence, select a policy response and record the outcome. The client can display the response. It should not be able to grant itself a different result by changing a hidden field or skipping a screen.

State Required distinction Operational response
Evaluated A usable assessment was returned Apply the versioned policy
Missing Expected evidence was absent Retry, step up or review as designed
Late Evidence arrived after the decision boundary Associate it without issuing a duplicate action
Failed The service or request failed Use the documented fallback
Repeated The business action already has a result Return or reconcile the existing result

Make retries safe

Use a business-action reference to avoid granting the same benefit twice. A timeout does not prove the original request failed before processing. Preserve enough state to reconcile a later response or webhook with the existing action.

Authenticate callbacks according to the vendor’s documented mechanism. Validate event type and business association before updating an account. Plan how duplicate or out-of-order callbacks affect a decision that support has already reviewed. The policy should make those transitions explicit.

Test failures as well as successful responses

Use controlled tests for absent client data, an expired event, an invalid reference, a slow response and a duplicate business request. Then inspect what the customer sees and what operations can investigate. The desired result is a predictable, documented state rather than an unhandled error or a silent unrestricted grant.

Keep a small set of legitimate scenarios in the same test plan: a returning user, a shared company network and a customer switching devices. Integration correctness and business-policy correctness are separate checks. A perfectly retrieved event can still feed an overly broad rule.

Assign an owner for the integration

Someone must own credential rotation, product changes, usage limits, incident response and policy rollback. Include those costs when comparing suppliers. A low per-call rate does not remove the work of maintaining your account model or responding to customers.

Record vendor usage by request type and business journey. Compare it with the purchased billing unit. Identification events, risk calls, IP lookups and transaction decisions are not equivalent units. Read the vendor shortlist guide before normalizing prices across products.

Begin in observation mode, inspect the resulting evidence and release enforcement to a narrow cohort. The controlled rollout guide provides an operational checklist for that transition.

FAQ

Can the API key be placed in the browser?

Use only the vendor’s designated public client identifier in client code. Keep server credentials in the server environment and follow the vendor’s integration contract.

Is a successful HTTP response sufficient?

No. Validate the result’s meaning, event association and required fields before applying the business policy.

What should a timeout mean?

It means the decision lacks a timely usable result. Define a fallback for the particular action and preserve a reference for reconciliation.

Keep going

Turn the guidance into a decision.

Compare the tools ↗ Plan a controlled rollout →