Embed guide

Embed kiosk in your app.

kiosk runs inside your page as an iframe. Your page builds a link, frames it and listens for one message when the payment is through. The flow, the sign-in and the money stay on kiosk's side.

  • Nothing to install, no key to start
  • One link sets the token, the network and the amount
  • Works on any site or webview

Step 1

Build the pay URL.

The link carries everything, and you don't need an account: the price is quoted when the link opens.

URL
https://www.kiosk.money/pay?chain=polygon&token=USDC&to=0x…&amount=96&ref=INV-2026-0142&return=https://your.app/thanks
  1. https://www.kiosk.money/payThe widget's address
  2. ?chain=polygonThe network the tokens arrive on
  3. &token=USDCThe token that arrives
  4. &to=0x…Where it arrives. Leave it out and the user receives in their own wallet
  5. &amount=96How much has to arrive, in the token
  6. &ref=INV-2026-0142Your own id for the payment. You get it back at the end
  7. &return=https://your.app/thanksWhere the user goes back to when it is done
  • What arrives
  • Where it lands
  • What comes back

What the link sets decides what the user does

  • chaintokentoamount

    Buy crypto

    The user picks the amount and receives in their own wallet. Good for a Buy crypto button.

  • chaintokentoamount

    Top up an account

    The user picks the amount and it lands at the address you set, such as a deposit address you keep per user.

  • chaintokentoamount

    Checkout

    The amount is fixed. The user only chooses how to pay: PIX, or a token from a wallet. Good for an order or an invoice.

A small function keeps the link in one place:

JavaScript
const payUrl = ({ chain, token, to, amount, ref, returnUrl, color, theme }) => {
  const params = new URLSearchParams({ chain, token });
  if (to) params.set("to", to);
  if (to && amount) params.set("amount", amount);
  if (ref) params.set("ref", ref);
  if (returnUrl) params.set("return", returnUrl);
  if (color) params.set("color", color);
  if (theme) params.set("theme", theme);
  return `https://www.kiosk.money/pay?${params}`;
};

With a project

Add your publishable key to the link (pk=pk_…) and it loads only on your sites. To fix the amount and the recipient, skip building the link: your server creates a session and you use its url. See keys and sessions.

Step 2

Put it in an iframe.

The widget is designed for 400 × 680. Give it at least that much room.

HTML
<iframe
  src="https://www.kiosk.money/pay?chain=polygon&token=USDC&to=0x…&amount=96&ref=INV-2026-0142"
  title="kiosk checkout"
  allow="clipboard-write; camera"
  style="border:0;border-radius:28px;width:100%;max-width:400px;height:680px"
></iframe>
  • clipboard-write lets the user copy the PIX code.
  • camera is for the ID check.
  • The 28px radius matches the widget's own corners.
  • A session's url goes in the same iframe, in place of the link. See sessions.

Want the snippet written for you? Pick the token, network and color in the configurator.

In React, render the same iframe and re-key it whenever the URL changes:

React
// payUrl is the function from step 1, listenForPaid the one from step 3.
type PayOptions = Parameters<typeof payUrl>[0];
type Paid = { tx: string | null; ref: string | null };

function KioskWidget({ onPaid, ...options }: PayOptions & { onPaid?: (paid: Paid) => void }) {
  const frame = useRef<HTMLIFrameElement>(null);
  const src = payUrl(options);
  useEffect(() => listenForPaid(() => frame.current?.contentWindow ?? null, onPaid), [onPaid]);
  return (
    <iframe
      ref={frame}
      key={src}
      src={src}
      title="kiosk checkout"
      allow="clipboard-write; camera"
      style={{ border: 0, borderRadius: 28, width: "100%", maxWidth: 400, height: 680 }}
    />
  );
}

Reference

Every parameter.

Only chain and token are required. A link with a wrong value says which part is wrong instead of opening.

What arrives

chainRequired
The network, by id (8453) or by name (base, polygon, arbitrum, solana and others).
tokenRequired
A symbol on that network (USDC, ETH, BRLA) or a token contract address.

Where it lands

to
The recipient on that network. EVM addresses must be EIP-55 checksummed. Without it, the user receives in their own wallet.
amount
What has to arrive, in the token, with up to 6 decimals. Needs to. Without it, the user picks the amount.
margin
Percent the payer is asked for over the exact price, from 0 to 10. The default is 1 for stablecoins and 2 for other tokens. Anything that lands above amount is the recipient's.

What comes back

ref
Your order id, up to 120 characters. It comes back on the return URL and in the kiosk:paid message.
return
Where the Back button leads once the payment is through. https only. Without a key, it also limits the kiosk:paid message to that origin.

How it looks

color
The color of the buttons and links, by name or hex. Other values are refused.coral(default)skymintbutter
theme
light or dark. Without it, the widget follows the visitor's own setting.

Your own credits

display
credits shows what arrives as your own credits instead of the token. Needs unit and rate.
unit
The name of the credits, such as Gems. 24 characters at most.
rate
Credits per 1 token: 100 for 100 Gems per USDC. Display only, the tokens still arrive at to.
icon
A square https image for the credits, shown in a 28px circle.

Partner dashboard

Add a project when you need more.

Everything above works without an account. A project adds a key for your page, a key for your server, the sites allowed to show the widget and a webhook. Sign in to the partner dashboard with an e-mail code and create one.

Three ways to open the widget

  • /pay?chain=…&token=…

    A plain link

    Any page can frame it. Nothing is recorded for you, and the payer's browser holds every parameter.

  • /pay?pk=pk_…&chain=…

    A link with your publishable key

    Loads only on your allowed sites. Payments show in your dashboard and send your webhooks. The payer's browser still holds the amount and the recipient.

  • /pay?session=cs_…

    A session from your server

    Loads only on your allowed sites. Your server fixed the amount and the recipient, and reads the outcome with your secret key.

When the amount or the recipient must hold, create a session on your server.

A link with a key alone is set by the payer's browser: anyone can change its to or amount before paying. A session keeps them on our side, out of the page's reach. See sessions.

pk_…Publishable key
Goes in the link as pk=. It names your project, so its payments show in your dashboard and send your webhooks, and it keeps the widget to your allowed sites. It is not a secret: anyone can read it in your page, so it cannot protect the amount or the recipient.
sk_…Secret key
Stays on your server, sent as Authorization: Bearer sk_…. Its one use is the sessions API. Make one on the Keys page with a name: it is shown once, so store it then. You can have up to ten active. Replace one or turn it off from the same page; a key turned off stops working at once. Never put it in a page, an app or a repository.

Add the key to the link you already build. Your project's home in the dashboard shows this frame with your key filled in:

HTML
<iframe
  src="https://www.kiosk.money/pay?pk=pk_…&chain=polygon&token=USDC"
  title="kiosk checkout"
  allow="clipboard-write; camera"
  style="border:0;border-radius:28px;width:100%;max-width:400px;height:680px"
></iframe>

Partner dashboard

Choose where it can appear.

With a key or a session in the link, the widget loads only inside the sites you allow. Anywhere else, it stays blank.

  • Add each site as the browser names it: https://, the host and the port if there is one, and nothing after. For example https://app.example.com.
  • The kiosk:paid message goes to your allowed sites and to no one else, whatever return says. A popup opened from one of them gets it too.
  • With no allowed site, a link with a key or a session loads nowhere. Add your site before you ship.
  • A link with neither pk nor session stays as open as before: any page may frame it.

Server API

Fix the payment on your server.

A checkout session holds a payment your server decided. The payer opens it and can change neither the amount nor the recipient.

Create a session

POST /api/v1/sessions

Send the pay link's parameters as a JSON object, under the same names. Here to and amount are required. Values are strings or numbers, and a name the link does not take is refused.

Shell
curl https://www.kiosk.money/api/v1/sessions \
  -H "Authorization: Bearer sk_…" \
  -H "Content-Type: application/json" \
  -d '{
    "chain": "polygon",
    "token": "USDC",
    "to": "0x…",
    "amount": "96",
    "ref": "INV-2026-0142",
    "return": "https://your.app/invoices/INV-2026-0142"
  }'

The answer

201
JSON
{
  "id": "cs_…",
  "url": "https://www.kiosk.money/pay?session=cs_…",
  "status": "open",
  "reference": "INV-2026-0142",
  "expires_at": "2026-11-19T14:03:11.482Z"
}

Frame url the way step 2 frames a link, or send the payer to it. Keep id with your order. A session lasts 24 hours and can be paid once.

Read a session

GET /api/v1/sessions/{id}
JSON
{
  "id": "cs_…",
  "status": "paid",
  "reference": "INV-2026-0142",
  "expires_at": "2026-11-19T14:03:11.482Z",
  "amount_received": "96.31",
  "tx": "0x…"
}

amount_received is what arrived, in the token, and tx the transaction that delivered it; both are null until it is paid. A session of another project reads as not found.

Statuses

open
Not paid yet. The payer can open it until expires_at; a payment started by then can still finish after it.
paid
The session's token was delivered to its to.
failed
The payment did not go through, or what arrived was not the session's token at to. The session is closed: create a new one to try again.
expired
Nobody paid within 24 hours. No webhook is sent for it.

Compare what arrived before you fulfil.

paid means the session's token was delivered to its to, not how much of it. Compare amount_received with the amount you asked for before you fulfil the order.

Errors

A refused call answers with its HTTP status and a JSON body. param names the parameter when the error is about one, and message is for you to read, not for your code to match.

JSON
{
  "error": {
    "code": "invalid_request",
    "message": "The amount parameter is missing or invalid.",
    "param": "amount"
  }
}
StatusCodeWhen
400invalid_requestThe body is not a JSON object, names a parameter the link does not take, or has one missing or invalid.
401unauthorizedNo secret key, or one that is not valid or was turned off.
404not_foundNo session with that id for this key's project, or no endpoint at that path.
405method_not_allowedSessions are created with POST and read with GET.
500, 502server_errorSomething failed on our side. Try again later; if it keeps failing, send us the ref from the body.

Server API

Hear about it on your server.

Save an endpoint on the Webhooks page and we call it when a payment from your project ends, signed with the endpoint's signing secret.

Events

session.paid
A payment was delivered. Under a session, to its to.
session.failed
A payment did not go through.
test
Sent by the dashboard's Send a test webhook button, and tried once. Its data looks paid and is made up: never fulfil anything on it.

The body

JSON
{
  "id": "evt_…",
  "type": "session.paid",
  "created": "2026-11-18T14:09:52.118Z",
  "data": {
    "session": "cs_…",
    "reference": "INV-2026-0142",
    "status": "paid",
    "chain": 137,
    "token": "USDC",
    "amount_received": "96.31",
    "tx": "0x…"
  }
}
id
The event's own id. Retries carry the same one: handle it once.
type
session.paid, session.failed or test.
created
When the event was created, in ISO 8601.
data.session
The session's id, or null for a payment made with a publishable key alone.
data.reference
Your ref, or null.
data.status
paid or failed.
data.chain
The network, by chain id.
data.token
The token's symbol.
data.amount_received
What arrived, in the token. null unless paid.
data.tx
The transaction that delivered it, or null.

A key-only payment is a notification.

A webhook for a payment made with a publishable key alone has session: null. Its link was set in the payer's browser, so it tells you a payment happened, not who was paid. To act on a payment, use a session's webhook or read the session.

Verify the signature

Every call carries a Kiosk-Signature header: t=1763474992,v1=5f2b…. t is when it was signed, in seconds, and v1 is HMAC-SHA256 of t, a dot and the raw body, keyed with your signing secret (whsec_…), in hex. Recompute it before you parse the body, compare in constant time, and refuse an old t.

Node.js
import { createHmac, timingSafeEqual } from "node:crypto";

// rawBody: the request body exactly as it arrived, before any JSON parsing.
// secret: your signing secret (whsec_…), kept on your server.
function verifyKioskSignature(rawBody, header, secret, toleranceSeconds = 300) {
  const parts = Object.fromEntries(String(header ?? "").split(",").map((part) => part.split("=", 2)));
  const t = Number(parts.t);
  if (!Number.isInteger(t) || !parts.v1) return false;
  if (Math.abs(Date.now() / 1000 - t) > toleranceSeconds) return false; // too old: a replay
  const expected = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest();
  const given = Buffer.from(parts.v1, "hex");
  return given.length === expected.length && timingSafeEqual(given, expected);
}

Parse the JSON only once the signature checks out. With Express, take the route's body with express.raw(), not express.json(), so you hold the bytes that were signed.

Delivery

Answer with a 2xx within 10 seconds and the call counts as delivered; redirects are not followed. Answer first and do the work after. Anything else is tried again:

  1. Right away
  2. 1 min
  3. 5 min
  4. 30 min
  5. 2 h
  6. 6 h
  7. 12 h

Seven attempts over about 21 hours, then the delivery is marked failed. The Webhooks page lists the latest deliveries and can send any of them again.

Live configurator

See it before you build.

Pick what arrives and how it looks. The widget here is the real one and follows every choice, and the snippet is ready to paste.

Show as
Token
Network
Color
LiveThis is the real widget
You pay
You get
—
To your wallet
Secured
HTML
<iframe
  src="https://www.kiosk.money/pay?chain=polygon&token=USDC"
  title="kiosk checkout"
  allow="clipboard-write; camera"
  style="border:0;border-radius:28px;width:100%;max-width:400px;height:680px"
></iframe>

This snippet presets the token and the network. To send to your own address or fix an amount, build the link in step 1.

Bring your first users on-chain this week.

No integration fees for early partners.

Get early access