# Try the age gate · Ageseal

Canonical URL: https://ageseal.eu/demo

> Try the Ageseal age gate in a pretend shop. See the wallet step, the signed yes or no your server receives, and what Ageseal stores: counts only. Nothing is sold.

A pretend shop with an age gated checkout. Pick what the visitor does, press play, and watch the whole experience. Demo shop. Nothing is sold. The shop, Kelari, is invented.

## How the demo works

1. The checkout of an invented shop is locked until the visitor shows they are over 18.
2. Pick an outcome (pass, fail, no wallet or cancelled) and press Play simulation. The page plays the wallet step, the result, and what the shop's server and Ageseal see.
3. Nothing is sent anywhere. The live service will return the same outcomes once Ageseal launches.

## Simulated outcomes

- **Pass.** Over 18 confirmed. Checkout is open, and the shop never learned who you are.
- **Fail.** Sorry, this shop can only sell to people over 18. Nothing about you was kept.
- **No wallet.** No wallet could answer. The shop sends the visitor to its own fallback check. Example fallbacks: show an id at delivery, check by card with a small refundable charge.
- **Cancelled.** The visitor cancelled. Nothing was shared and no token was issued.

The wallet consent screen in the demo is an illustration. The real one is drawn by the visitor's browser and wallet.

## What your server receives

Example claims of a decoded token for a simulated pass, using a test key. A failed check returns a token whose `result` is false. A real token is a signed JWT that your server verifies with Ageseal's public keys. It has no subject, no name and no document data.

```json
{
  "iss": "https://api.ageseal.eu/test",
  "aud": "test:site_7Kq2",
  "over": 18,
  "result": true,
  "method": "mdoc",
  "mode": "test",
  "iat": 1795000000,
  "exp": 1795000600,
  "jti": "q3vF8m2kZc7Rt1xA9pLw0g"
}
```

## What Ageseal stores

One number per outcome, per site and day. No names, no birth dates, no IP addresses and no record of who was checked. The demo shows four counts: passed, failed, abandoned and fallback.

## The integration

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

Client, `checkout.html`:

```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, `server.js`:

```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();
```

Next: the quickstart at https://ageseal.eu/docs/quickstart, or join the waitlist at https://ageseal.eu/#waitlist.
