nano133

Build · nano133 Kit

Nano Checkout

Take Nano on your own site: each checkout gets its own address and a clean amount, and your site checks the payment on a Nano node in about a second. A sweep moves the money to your own wallet, with no fee.

One checkout, start to end

  1. A price becomes a clean amount, at an address only this checkout has.
  2. The buyer scans the QR code and pays.
  3. The network confirms it, usually in about a second.
  4. Your server asks your node, and the order is marked paid.
  5. A timer moves the money to your own wallet. No fee.

Good to know. An order is marked paid only when the page asks before the end of the grace. If the buyer pays and closes the page, the order is marked paid only when the page asks again in that time.

A wrong amount is not paid. One raw short or over, or a payment after the grace, marks nothing paid. With Late Payment Return, a payment of at least Ӿ0.001 goes back to its sender in full.

Why it works

How it works

Every step, and why

  1. A price becomes a clean amount at its own address.The price rounded up to 0.0001 XNO, and an address that only this checkout has.
    Why no memo

    The address names the checkout, so no memo is needed. Each address comes from one secret and a counter: the next checkout gets the next address.

    Why a clean amount

    The amount has at most four decimals and no tail. A wallet that keeps four decimals sends exactly that amount.

  2. The buyer scans and sends.The QR code holds that address and the exact amount.
    Show every digit

    The buyer’s wallet reads the code, and the buyer sends. An amount that is cut or rounded is not this checkout’s payment, so show every digit.

  3. The network confirms it.The computers of the Nano network vote on the payment. It is confirmed, usually in about a second.
  4. Your site sees it.Your server asks your node for a confirmed payment of exactly this amount to this checkout's address, first seen while the checkout was open.Good to know. An order is marked paid only when the page asks before the end of the grace. If the buyer pays and closes the page, the order is marked paid only when the page asks again in that time.
    How the page asks

    While the payment page is open, it asks your server every 2 seconds. When there is such a payment, the order is paid: your server signs a receipt, and your site gives it to the browser that started the checkout.

    No tolerance

    The amount must be exact: one raw (the smallest unit) short or over is not paid.

  5. The sweep moves it to your wallet.A timer receives that one payment at the checkout’s address and sends exactly the amount to your own address, once.
    Your address is fixed in your code

    The sweep never reads where to send from a record, a request or a database row, so nothing a visitor can change can send the money anywhere else.

    Exactly once

    The send is recorded before it is published. A crash, or a second run at the same time, never sends twice.

    It stops when a record is wrong

    If a record’s index does not give its address, or the stored payment is not a confirmed send of the amount to that address, nothing moves.

  6. A wrong amount, or a late payment.Any other payment is not this checkout’s, and nothing is marked paid.
    When a payment counts
    A payment counts only whenDefault
    it is exactly the checkout's amountthe price rounded up to 0.0001 XNO
    it goes to the checkout's own addressalways
    your node confirmed italways
    your node first saw it while the checkout was open, or in its grace15 min + 1 hour
    no other checkout used itone payment, one checkout
    It goes back in full

    With Late Payment Return, such a payment of at least Ӿ0.001 goes back to its sender in full, from the checkout's address, by itself, exactly once, after about 2 hours. A rounded amount, a short one, a second payment and a late one all go back the same way. That needs @nano133/late-returns version 0.4.0, and the key that your server already holds for the checkout addresses.

  7. No fee, no payment company.The money ends in your wallet.
    No account

    You need no account at a payment company. The money goes from the buyer, through a checkout address that your own secret controls, to your wallet.

    What it costs you
    • No fee: Nano has none. A 1¢ sale pays you 1¢.
    • A little proof of work for the sweep’s two blocks, from your node. The buyer’s wallet does the work for its own send.
    • A few node calls per claim. Rate-limit the claim route per visitor.
Example only: do not pay
  1. Checkout 1Ӿ0.0278 · nano_1pju…edhe
  2. Checkout 2Ӿ0.0278 · nano_14oa…oeaf
  3. Checkout 3Ӿ0.0278 · nano_3q7j…dpbz

Try it: three buyers, one 1¢ item. Each checkout asks for the same clean amount at its own address; the address (bold) is different.

nano133.com is moving its own checkouts to this way, one flow at a time. The “I want this” signals, the idea fee, Unlock, Tips, Fans and the Glimmer ad skip use it now.

Want to understand every step, or build it yourself? Read the guide Accept Nano payments without a processor. It has a recipe for Google Cloud and one for Cloudflare Workers (both Pre-alpha).

The keyless way: one address and a unique amount

The package still does what it did before, and its old calls work exactly as they did. Every checkout pays your one address and asks for the price plus a small random tail in the last digits. It needs no key on your server, only your address, so it fits a Cloudflare Worker or a site with no server.

An address for each checkoutThe keyless way
Key on your serverOne seed (a hot wallet)None
What it needsA server that can sign and do proof of work (the sweep)Only your address
A wallet that rounds the amountPaysCannot pay: the payment goes back
Where the money landsAt the checkout address, then yours after the sweepIn your wallet, with no sweep
Pick it whenYou have a server and want every wallet to workYou want the simplest set-up and no key

Both depend on your node: when it does not answer, nothing is credited. Use a node you trust, or two.

  • Its limit: a wallet that cuts or rounds the amount before it sends can never be matched. Cake Wallet sent Ӿ0.0593 for a quote of Ӿ0.059300000000000000000000801448, and nothing could match that payment. If you can keep a seed on your server, use an address for each checkout.

Security

  • An address for each checkout keeps a seed on your server. Every checkout address comes from one secret, so the server can sign for all of them: a hot wallet. The sweep moves each payment on, so little waits there, but anyone who gets the secret can take what waits and can derive every address. Keep it in a secret manager, never in code or in the database.
  • Never change the secret after your first checkout. Every earlier address could then no longer be derived, and its money could not be swept or returned. Back it up like a wallet seed.
  • Your own address is a fixed value in your code. The sweep never reads it from a record, a request or a database row.
  • The keyless way holds no key: checkouts only need your address, and nobody can take money from your site.
  • Use your own Nano node: its answers decide what you credit and what you send. When it doesn't answer, nothing is credited.
  • Take prices from your server, never from the browser. A price below 0.0001 XNO is refused.
  • Receipts are signed with your secret. Keep it in a secret manager, and give a receipt only to the browser that started the checkout.

Set it up with AI

Paste this into Claude, ChatGPT, Gemini or your coding agent, in your site's repository:

Add "Nano Checkout" to this site: let people pay in Nano (XNO), check the payment
on a Nano node, and give a signed receipt. Use the npm package @nano133/checkout
and follow its SPEC step by step:
https://nano133.com/build/nano-checkout/SPEC.md
Recommend its first way: an address for each checkout, with a clean amount and a
sweep to my own address. That puts a seed on the server, so ask me before you use it.
Ask me for the receiving address and the node to use. Never print, log or commit
a secret or a seed. Test with the package's mock ledger first.

The agent follows the step-by-step spec. Claude Code users can install the add-nano-checkout skill from the nano133 Kit.

Set it up by hand

Install @nano133/checkout. Give each checkout its own address and a clean amount. Ask your node for the payment. Sweep paid checkouts to your own address on a timer.

Show the 11 steps

For developers

The spec's steps

  1. Choose your own address and your node.Where each payment ends, and the node you trust.
  2. Install the package.@nano133/checkout, with nanocurrency-web and @noble/hashes for an address for each checkout.
  3. Choose a store.The Firestore adapter (with its index counter), or your own for any database with transactions.
  4. Create two secrets.In your secret manager. Never change the checkout secret after the first checkout.CHECKOUT_SECRET
  5. Add a checkout route.The price from your server, an address for each checkout, rate-limited.POST /api/checkout
  6. Show the payment.A QR code, an “Open in wallet” link, the exact amount and the checkout’s address.
  7. Add a claim route.The page polls it every 2 seconds. Answer 503 when your node doesn’t answer.POST /api/claim
  8. Check the receipt on the server.Before you show what was paid for.
  9. Run the sweep on a timer.Your own address is a fixed value in your code.sweepPaid
  10. Send wrong payments back.Late Payment Return, with the checkout addresses.
  11. Test it.On the package’s mock ledger, then with one real payment.