Forter
Get the commerce token for your checkout or login flow. Locate the merchant's Forter bundle and site ID, then preserve the checkout/login session in which the token will be used.
{
"clientKey": "capzy_YOUR_API_KEY",
"task": {
"type": "ForterTask",
"target_url": "https://www.arcteryx.com/us/en/checkout",
"forter_js_url": "https://cdn.forter.com/cbf12a88ccce/forter.js",
"site_id": "cbf12a88ccce",
"proxyType": "http",
"proxyAddress": "ip",
"proxyPort": "port",
"proxyLogin": "username",
"proxyPassword": "password"
}
}Illustrative values. Replace the inputs with values from your current integration.
Locate the Forter script.
Locate the merchant's Forter bundle and site ID, then preserve the checkout/login session in which the token will be used.
Your API key authenticates Capzy.
Provider keys, challenge IDs, images, and session values belong inside task.
Copy the bundle URL and merchant site ID.
- In Network or page source, locate the merchant's forter.js script.
- Copy its complete URL into forter_js_url. Read site_id from the merchant configuration or the site-specific path segment.
- Use the full checkout/login page that loads it as target_url. Keep the script URL and site ID paired.
{
"target_url": "https://example.com/checkout",
"forter_js_url": "https://cdn.forter.com/YOUR_SITE_ID/forter.js",
"site_id": "YOUR_SITE_ID"
}Use the merchant's configured bundle rather than a generic script URL without its site identifier.
How Forter works
Forter (forter.com) is a commerce security platform used by major retailers for fraud prevention. It injects a small forter.js script on checkout and login pages that continuously fingerprints the device and behaviour and produces a signed token. The merchant sends this token with the order — Forter's API returns an approve, decline, or challenge verdict. The token is delivered via the ftr:tokenReady DOM event fired by forter.js, and is also written to the forterToken cookie (a multi-year device identifier). Tokens are bound to the IP used during fingerprinting, so a residential proxy is required — and Forter scores the whole session, so the token works best when it is replayed from a coherent session (same IP and User-Agent).
We launch a self-owned capium browser with your residential proxy and navigate to the real target page. Before forter.js loads, we install a ftr:tokenReady listener and block WebRTC RTCPeerConnection to prevent IP leaks through STUN. We then dynamically inject forter_js_url and wait for the token event. The forterToken cookie is used as a fallback if the event misses.
- Real capium browser — forter.js fingerprinting looks identical to a genuine device visit
- WebRTC blocked: RTCPeerConnection is disabled before forter.js loads to prevent STUN IP leak
- ftr:tokenReady listener installed before script injection — no race condition
- forterToken cookie fallback if the DOM event fires before the listener attaches
- Fresh randomized Windows device fingerprint per solve — no reused device profile
- Bring your own User-Agent: we mint the token under it and return it for replay
- No shared pool — each solve gets its own isolated browser instance and proxy IP
Know what goes in.
Choose a field to see its purpose, where to get it, and its place in the request. Optional values omitted from the example can be added when your flow uses them.
Keep your proxy exit and session identity consistent when using this result.
Request authentication
Required task inputs
Optional context
Proxy connection
target_url
stringRequiredFull URL of the page where Forter is active (e.g. the checkout or login page).
Copy the full URL of the page loading this integration from the address bar or your client request.
Open the input guidehttps://www.arcteryx.com/us/en/checkout{
"clientKey": "capzy_YOUR_API_KEY",
"task": {
"type": "ForterTask",
"target_url": "https://www.arcteryx.com/us/en/checkout",
"forter_js_url": "https://cdn.forter.com/cbf12a88ccce/forter.js",
"site_id": "cbf12a88ccce",
"proxyType": "http",
"proxyAddress": "ip",
"proxyPort": "port",
"proxyLogin": "username",
"proxyPassword": "password"
}
}The selected field is highlighted when present. Preserve the declared value type and current challenge context.
Make your first request.
Create the task, keep its taskId, and poll until status is ready. Then read the selected variant's solution.
- Create the task
Send
clientKeyand the selectedtaskto/createTaskfrom your server. Keep the returnedtaskId. - Wait for the solution
Send that same key and ID to
/getTaskResult. While processing, wait two seconds before checking again. Stop on Ready or an error. - Apply the result
Send solution.token through the merchant's expected Forter header or cookie transport, preserving solution.userAgent, original session cookies, and the solving/submission exit.
import json, os, time
import requests
API = "https://api.capzy.ai"
KEY = os.environ["CAPZY_API_KEY"]
task = json.loads("{\"type\":\"ForterTask\",\"target_url\":\"https://www.arcteryx.com/us/en/checkout\",\"forter_js_url\":\"https://cdn.forter.com/cbf12a88ccce/forter.js\",\"site_id\":\"cbf12a88ccce\",\"proxyType\":\"http\",\"proxyAddress\":\"ip\",\"proxyPort\":\"port\",\"proxyLogin\":\"username\",\"proxyPassword\":\"password\"}")
def call(path, payload):
response = requests.post(f"{API}/{path}", json={"clientKey": KEY, **payload}, timeout=30)
response.raise_for_status()
data = response.json()
if data.get("errorId", 0) or data.get("status") == "failed":
raise RuntimeError(data.get("errorDescription") or data.get("errorCode") or "Task failed")
return data
created = call("createTask", {"task": task})
for attempt in range(60):
result = call("getTaskResult", {"taskId": created["taskId"]})
if result.get("status") == "ready":
solution = result["solution"]
print(solution)
break
time.sleep(2)
else:
raise TimeoutError("Task is still processing; keep the taskId to check it later.")
Before runningReplace all illustrative inputs with your captured values. Set CAPZY_API_KEY in your environment. Install requests with pip install requests.
Polling and failuresThe example checks HTTP/API failures, uses 30-second request timeouts, and stops after 60 result checks. Retain taskId if your task is still processing.
Understand what comes back.
Follow this task from creation to completion. Response fields and usage follow your selected request variant.
Forter token + user-agent
Send solution.token through the merchant's expected Forter header or cookie transport, preserving solution.userAgent, original session cookies, and the solving/submission exit.
- string
- The Forter token from ftr:tokenReady. Send as x-forter-token header or forterToken cookie on your checkout/order request.
- string
- The User-Agent used during fingerprinting. Include it on your follow-up request.
{
"errorId": 0,
"status": "ready",
"solution": {
"token": "4a7fb2c09d123456789abcdef01234ab_1722345678901_0_ftr_1",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ..."
}
}Illustrative values. Additional metadata may be returned; only Ready contains a completed solution.
Carry the Forter token into checkout
Use the merchant's configured delivery path: x-forter-token or its forterToken cookie. Preserve the original checkout state, solving proxy, and returned user-agent. These fragments show the header path; the checkout endpoint and order fields belong to your application.
Execution context result is the parsed Ready response from the polling example. session, when referenced, is your existing requests.Session (or browser-compatible session) with the original cookie jar, headers, and solving proxy configured in session.proxies for both http and https. Keep this client for the complete flow. task is the task object you submitted. For Shape, action_body is the original protected request body as bytes or a string, with its original Content-Type in session.headers. Install curl_cffi when the fragment imports it; match the target's required browser/TLS identity.
sol = result["solution"]
# session retains your original proxy, cookies, and checkout context.
response = session.post("https://target.example.com/checkout",
headers={"x-forter-token": sol["token"], "User-Agent": sol["userAgent"]},
json={"orderId": "YOUR_ORDER_ID"}, timeout=30)When something doesn't work.
Check your captured values, the selected variant, and the response before starting another task.
Where do I find forter_js_url and site_id?
Open DevTools on the target checkout or login page and search the page source for 'forter.com'. You will find a script tag like <script src="https://cdn.forter.com/cbf12a88ccce/forter.js">. The full src is forter_js_url and the 12-hex segment in the path (cbf12a88ccce) is site_id.
Which header do I send the token on?
Set x-forter-token: <token> as an HTTP header on your checkout or order API request. Some implementations also accept it as the forterToken cookie. Check the target site's outgoing requests in DevTools to see which format is used.
Why is a proxy required?
Forter embeds the egress IP into the fingerprint. The IP used during token generation must match the IP that calls the merchant's server, or Forter flags the session as suspicious. Use a residential proxy that you also use for the final checkout/order request.
How long is the token valid?
Forter is a persistent device fingerprint — the forterToken cookie is written with a multi-year expiry. What matters is coherence, not age: replay the token from the SAME IP it was minted under (Forter is IP-scored) and the same User-Agent.
Can I reuse the token?
Yes — it is a device identifier, not a single-use nonce, and can be sent on multiple requests in the same session. Forter's script updates the token value as it collects more data, so send the latest value you have. Re-minting every few seconds is unnecessary and can itself look anomalous.
Can I set my own User-Agent?
Yes. Pass userAgent and we fingerprint the browser with that exact UA, then return the same value in the solution. Send that User-Agent on your checkout/order request so the token, IP, and UA all line up. If you leave it out, we generate a fresh Windows fingerprint per solve and return its User-Agent for you to reuse.
Integration checks for Forter
- Use the same proxy for the Forter solve AND your follow-up checkout/order request. The token is IP-bound — a different exit IP will cause Forter to flag the session.
- Include the returned User-Agent on your follow-up request for full fingerprint coherence.
- The forterToken is a long-lived device fingerprint — replay it from the same IP and User-Agent it was minted under. Re-minting every few seconds is unnecessary.
- Forter scores the whole SESSION, not just the token. It expects its forter.js to run live in the browser that submits the order (continuous behavioral beacons). A token minted in one browser and replayed by another — especially a browser that blocks forter.js — may be accepted but scored as high-risk (order confirmed, then reversed). For best results the token, live forter.js, IP, and order request should all come from one coherent session.
Connect Forter to your workflow.
Get your Capzy API key and use this guide's integration.
ForterTask · Live configuration