<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Signet</title>
    <description>The latest articles on DEV Community by Signet (@signetsentry).</description>
    <link>https://dev.to/signetsentry</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4256461%2Fd1f3470d-6bdc-4852-a60c-7ea618845d20.png</url>
      <title>DEV Community: Signet</title>
      <link>https://dev.to/signetsentry</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/signetsentry"/>
    <language>en</language>
    <item>
      <title>Integrate a fraud-risk API in five minutes (with a script tag and one POST)</title>
      <dc:creator>Signet</dc:creator>
      <pubDate>Fri, 20 Nov 2026 23:15:26 +0000</pubDate>
      <link>https://dev.to/signetsentry/integrate-a-fraud-risk-api-in-five-minutes-with-a-script-tag-and-one-post-5gik</link>
      <guid>https://dev.to/signetsentry/integrate-a-fraud-risk-api-in-five-minutes-with-a-script-tag-and-one-post-5gik</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;The live demo (no account) is here: &lt;a href="https://signetsentry.com/demo" rel="noopener noreferrer"&gt;https://signetsentry.com/demo&lt;/a&gt;. The full guide is at &lt;a href="https://signetsentry.com/guide" rel="noopener noreferrer"&gt;https://signetsentry.com/guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Get keys (about one minute)
&lt;/h2&gt;

&lt;p&gt;Create a free account at &lt;a href="https://signetsentry.com/signup" rel="noopener noreferrer"&gt;https://signetsentry.com/signup&lt;/a&gt;. No card is required. You get:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a &lt;strong&gt;public site key&lt;/strong&gt; (&lt;code&gt;pk_live_...&lt;/code&gt;) for the browser&lt;/li&gt;
&lt;li&gt;a &lt;strong&gt;secret API key&lt;/strong&gt; (&lt;code&gt;sk_live_...&lt;/code&gt;) for your server (shown once)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;sandbox keys&lt;/strong&gt; (&lt;code&gt;pk_test_...&lt;/code&gt; / &lt;code&gt;sk_test_...&lt;/code&gt;) that use no quota and store nothing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use the sandbox keys while you are wiring this up.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Add the tag
&lt;/h2&gt;

&lt;p&gt;Put this on the pages where you care about risk (login, signup, checkout). Replace the site key.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&lt;/span&gt; &lt;span class="na"&gt;async&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://signetsentry.com/v1/tag.js"&lt;/span&gt; &lt;span class="na"&gt;data-site-key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"pk_test_..."&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;If you have a form, mark it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;data-signet&lt;/span&gt; &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"post"&lt;/span&gt; &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/pay"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;!-- your fields --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Pay&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The tag inserts a hidden &lt;code&gt;signet_session_id&lt;/code&gt; field, including on forms your framework adds later.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Ask for a decision
&lt;/h2&gt;

&lt;p&gt;On the server, read &lt;code&gt;signet_session_id&lt;/code&gt; and call &lt;code&gt;POST /v1/assess&lt;/code&gt;. Keep the secret key off the client.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s https://signetsentry.com/v1/assess \
  -H &lt;span class="s2"&gt;"Authorization: Bearer sk_test_..."&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{"session_id":"s_...","event":"checkout"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A trimmed response looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"decision"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"review"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"risk_score"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"summary"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Review: a device on a scored network."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"reason_codes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"IP_DATACENTER"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"visitor"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"is_new"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"match_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"fuzzy"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"match_confidence"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.94&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;decision&lt;/code&gt; is &lt;code&gt;allow&lt;/code&gt;, &lt;code&gt;review&lt;/code&gt;, or &lt;code&gt;deny&lt;/code&gt;. You choose the action (for example: allow, step up with 2FA, or block). &lt;code&gt;match_confidence&lt;/code&gt; is a 0–1 score on the device match, not a yes/no, so you can set your own threshold.&lt;/p&gt;

&lt;p&gt;While you are still in the sandbox, you can skip a real browser entirely and use the magic session IDs &lt;code&gt;test_allow&lt;/code&gt;, &lt;code&gt;test_review&lt;/code&gt;, and &lt;code&gt;test_deny&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Optional: wait for a cookie banner
&lt;/h2&gt;

&lt;p&gt;If you must have consent before any device signals leave the browser:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&lt;/span&gt; &lt;span class="na"&gt;async&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://signetsentry.com/v1/tag.js"&lt;/span&gt;
        &lt;span class="na"&gt;data-site-key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"pk_test_..."&lt;/span&gt;
        &lt;span class="na"&gt;data-consent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"required"&lt;/span&gt;
        &lt;span class="na"&gt;data-respect-gpc&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nothing is collected or stored until your banner calls &lt;code&gt;Signet.consent(true)&lt;/code&gt;. &lt;code&gt;Signet.consent(false)&lt;/code&gt; stops collection and clears the stored token. &lt;code&gt;data-respect-gpc="true"&lt;/code&gt; treats a Global Privacy Control signal as a refusal.&lt;/p&gt;

&lt;p&gt;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 &lt;a href="https://signetsentry.com/privacy" rel="noopener noreferrer"&gt;https://signetsentry.com/privacy&lt;/a&gt; and &lt;a href="https://signetsentry.com/dpa" rel="noopener noreferrer"&gt;https://signetsentry.com/dpa&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Go live
&lt;/h2&gt;

&lt;p&gt;Switch &lt;code&gt;pk_test_&lt;/code&gt; / &lt;code&gt;sk_test_&lt;/code&gt; to &lt;code&gt;pk_live_&lt;/code&gt; / &lt;code&gt;sk_live_&lt;/code&gt; 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.&lt;/p&gt;

&lt;p&gt;If you want more detail — scoring profiles, webhooks, reason codes, or language-specific examples — the developer guide is the next stop: &lt;a href="https://signetsentry.com/guide" rel="noopener noreferrer"&gt;https://signetsentry.com/guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Signet is built by Main Street Playbooks for fraud prevention, not advertising.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>security</category>
      <category>javascript</category>
      <category>api</category>
    </item>
  </channel>
</rss>
