Interactive demo

Try the age gate

A pretend shop with an age gated checkout. Pick what the visitor does, press play, and watch the whole experience.

Kelari Natural wine

Demo shop. Nothing is sold.

Field Red 2024

Natural red, 75 cl

€18.00

Your cart

  • 1 × Field Red 2024€18.00
  • Delivery€4.00
  • Total€22.00

Checkout

Locked

Checkout is locked until the visitor shows they are over 18. Pick an outcome and press Play simulation.

Simulate

No wallet is involved. Pick what the visitor does and play it.

Outcome to play

What your server receives

Example
Decoded token claims
// Run a check to see the token.
// Your server gets a signed yes or no,
// and nothing else.

Example values for a test key, so iss and aud are the test ones. A real token is a signed JWT your server verifies with public keys.

What Ageseal stores

Counts only
Passed
0
Failed
0
Abandoned
0
Fallback
0

One number per outcome, per site and day. No names, no birth dates, no IP addresses and no record of who was checked. Counted in this page only, for this demo.

The integration

This page does what these two snippets do. Planned API, subject to change before the first release.

checkout.html
<script src="https://cdn.ageseal.eu/v1/ageseal.js" defer></script>
<script>
  verifyButton.addEventListener("click", async () => {
    const r = await Ageseal.check({ key: "pk_test_demo", over: 18 });

    if (r.result === "pass") {
      await fetch("/age-ok", { method: "POST", body: r.token });
    } else {
      showFallback(r.reason); // "no_wallet", "cancelled", ...
    }
  });
</script>
server.js
import { createRemoteJWKSet, jwtVerify } from "jose";

const jwks = createRemoteJWKSet(new URL("https://api.ageseal.eu/.well-known/jwks.json"));

// Live values: a test token has its own iss and aud, so it fails here.
const { payload } = await jwtVerify(token, jwks, {
  issuer: "https://api.ageseal.eu",
  audience: "site_7Kq2",
  algorithms: ["ES256"],
});
if (payload.result !== true || payload.mode !== "live") deny();