<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Signet]]></title><description><![CDATA[Signet]]></description><link>https://signetsentry.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 21 Nov 2026 16:14:09 GMT</lastBuildDate><atom:link href="https://signetsentry.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Integrate a fraud-risk API in five minutes (with a script tag and one POST)]]></title><description><![CDATA[Signet is a hosted device-intelligence API. You add one script tag, send a session ID from your server, and get back a fraud decision, a score, and a short…]]></description><link>https://signetsentry.hashnode.dev/integrate-a-fraud-risk-api-in-five-minutes-with-a-script-tag-and-one-post</link><guid isPermaLink="true">https://signetsentry.hashnode.dev/integrate-a-fraud-risk-api-in-five-minutes-with-a-script-tag-and-one-post</guid><category><![CDATA[Security]]></category><category><![CDATA[api]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[webdev]]></category><dc:creator><![CDATA[Signet]]></dc:creator><pubDate>Sat, 21 Nov 2026 04:02:46 GMT</pubDate><content:encoded><![CDATA[<p>Signet is a hosted device-intelligence API. You add one script tag, send a session ID from your server, and get back a fraud decision, a score, and a short explanation. This walk-through gets you from zero to a working allow / review / deny result in about five minutes.</p>
<p>The live demo (no account) is here: <a href="https://signetsentry.com/demo">https://signetsentry.com/demo</a>. The full guide is at <a href="https://signetsentry.com/guide">https://signetsentry.com/guide</a>.</p>
<h2>1. Get keys (about one minute)</h2>
<p>Create a free account at <a href="https://signetsentry.com/signup">https://signetsentry.com/signup</a>. No card is required. You get:</p>
<ul>
<li>a <strong>public site key</strong> (<code>pk_live_...</code>) for the browser</li>
<li>a <strong>secret API key</strong> (<code>sk_live_...</code>) for your server (shown once)</li>
<li><strong>sandbox keys</strong> (<code>pk_test_...</code> / <code>sk_test_...</code>) that use no quota and store nothing</li>
</ul>
<p>Use the sandbox keys while you are wiring this up.</p>
<h2>2. Add the tag</h2>
<p>Put this on the pages where you care about risk (login, signup, checkout). Replace the site key.</p>
<pre><code class="language-html">&lt;script async src="https://signetsentry.com/v1/tag.js" data-site-key="pk_test_..."&gt;&lt;/script&gt;
</code></pre>
<p>The tag profiles the browser in the background (device and browser attributes, a few behaviour counts — it does not read what is typed) and asks Signet for a session ID.</p>
<p>If you have a form, mark it:</p>
<pre><code class="language-html">&lt;form data-signet method="post" action="/pay"&gt;
  &lt;!-- your fields --&gt;
  &lt;button type="submit"&gt;Pay&lt;/button&gt;
&lt;/form&gt;
</code></pre>
<p>The tag inserts a hidden <code>signet_session_id</code> field, including on forms your framework adds later.</p>
<h2>3. Ask for a decision</h2>
<p>On the server, read <code>signet_session_id</code> and call <code>POST /v1/assess</code>. Keep the secret key off the client.</p>
<pre><code class="language-bash">curl -s https://signetsentry.com/v1/assess \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{"session_id":"s_...","event":"checkout"}'
</code></pre>
<p>A trimmed response looks like this:</p>
<pre><code class="language-json">{
  "decision": "review",
  "risk_score": 60,
  "summary": "Review: a device on a scored network.",
  "reason_codes": ["IP_DATACENTER"],
  "visitor": {
    "is_new": false,
    "match_type": "fuzzy",
    "match_confidence": 0.94
  }
}
</code></pre>
<p><code>decision</code> is <code>allow</code>, <code>review</code>, or <code>deny</code>. You choose the action (for example: allow, step up with 2FA, or block). <code>match_confidence</code> is a 0–1 score on the device match, not a yes/no, so you can set your own threshold.</p>
<p>While you are still in the sandbox, you can skip a real browser entirely and use the magic session IDs <code>test_allow</code>, <code>test_review</code>, and <code>test_deny</code>.</p>
<h2>4. Optional: wait for a cookie banner</h2>
<p>If you must have consent before any device signals leave the browser:</p>
<pre><code class="language-html">&lt;script async src="https://signetsentry.com/v1/tag.js"
        data-site-key="pk_test_..."
        data-consent="required"
        data-respect-gpc="true"&gt;&lt;/script&gt;
</code></pre>
<p>Nothing is collected or stored until your banner calls <code>Signet.consent(true)</code>. <code>Signet.consent(false)</code> stops collection and clears the stored token. <code>data-respect-gpc="true"</code> treats a Global Privacy Control signal as a refusal.</p>
<p>This is a hook, not legal advice. You still need a lawful basis and a notice that fits your jurisdiction. Signet publishes a privacy policy and a DPA at <a href="https://signetsentry.com/privacy">https://signetsentry.com/privacy</a> and <a href="https://signetsentry.com/dpa">https://signetsentry.com/dpa</a>.</p>
<h2>5. Go live</h2>
<p>Switch <code>pk_test_</code> / <code>sk_test_</code> to <code>pk_live_</code> / <code>sk_live_</code> when you are ready. The free plan includes 1,000 live assessments a month. Quota applies only to successful assessments, not to collecting a session, and not to sandbox keys.</p>
<p>If you want more detail — scoring profiles, webhooks, reason codes, or language-specific examples — the developer guide is the next stop: <a href="https://signetsentry.com/guide">https://signetsentry.com/guide</a>.</p>
<p>Signet is built by Main Street Playbooks for fraud prevention, not advertising.</p>
]]></content:encoded></item></channel></rss>