Stablecoin Checkout docs
v1.0.0
Live demoOperator console demo Get help
● Start · About 30 minutes

Installation
from the ZIP to the first merchant.

Install the packages, write your settings with the setup script, build, start the server, create the owner account of the operator console and your first merchant. Server specifics (systemd, Caddy, Docker) are in Deployment.

01Unpack and install

  1. UnzipPut the folder somewhere without spaces. On a server the provided units expect /opt/mikodes-checkout.
  2. Install the packages
    corepack enable
    pnpm install
    On a server use pnpm install --frozen-lockfile so the exact tested versions are installed.

02Write your settings

scripts/setup.mjs asks for your RPC URLs, fee addresses and domains, checks their format, writes the env file(s) with mode 0600 and generates two secrets: OPERATOR_ADMIN_KEY (printed once; put it in a password manager) and ADMIN_SECRET_KEY (encrypts console secrets at rest). Nothing is pre-filled with a MIKODES key, RPC or address; an empty answer disables that feature.

TargetCommandWrites
This computerpnpm run setupapps/server/.env
Linux + systemdsudo node scripts/setup.mjs --target bare --server-env /etc/mikodes-checkout/server.env --caddy-env /etc/mikodes-checkout/caddy.envserver env + Caddy env
Docker Composepnpm run setup -- --target dockerdeploy/.env

All options: node scripts/setup.mjs --help. Re-running with --force keeps current values (and the keys) unless you pass new ones; --force --rotate-admin-key generates a new operator key. Every variable is explained in Configuration.

03Build

pnpm run build                                   # every package, apps and the Solidity contract
pnpm --filter "@mikodes-checkout/server..." build   # or: only the server and what it needs
pnpm run build:web                               # static checkout and interim portal into ./web

build:web compiles every VITE_* variable in your shell into public JavaScript and warns when a name looks like a secret. Never put a secret there. With an empty VITE_API_URL the apps call the API on the same origin, which is what the provided Caddyfile gives them.

Console and product pages

The operator console (vendor/mikodes-admin/ui) and the product pages (apps/ops/dist) are served by the server itself at /admin and /ops. pnpm run build builds apps/ops; the server finds both folders next to itself, or at ADMIN_UI_DIR / OPS_UI_DIR.

04Start the server

pnpm start                                  # node --env-file=apps/server/.env apps/server/dist/main.js
curl -s http://127.0.0.1:8787/health         # {"ok":true,"chains":[...]}

On a server, use the systemd unit, PM2 or Docker instead (Deployment). Database migrations run automatically at start. The first log lines list everything that is disabled and why; read them.

05Create the owner account

  1. Find the setup codeOn the first start without an owner, the server log prints a one-time setup code (journalctl -u mikodes-checkout on systemd). It is shown once, in the log only.
  2. Open the consolehttps://admin.example.com/admin/ (or http://127.0.0.1:8787/admin/ locally), enter the code, your e-mail and a password. This first account is the owner.
  3. Follow Get startedThe console's setup checklist and Status page show blockers, for example a missing Solana RPC or a fee address missing for a chain that charges a fee.
The console is off without ADMIN_SECRET_KEY

If ADMIN_SECRET_KEY is empty, /admin is not mounted (settings and the API keep working). The setup script generates it; back it up together with admin.sqlite.

06Add your first merchant

Three ways:

  • Console → Merchants: create the merchant, set its fee and payout addresses.
  • Self-signup: turn on Console → Merchant onboarding → Self-signup. Merchants sign up at https://pay.example.com/signup; with Approve new merchants on (the default) they wait until you approve them on the Merchants page.
  • Operator API, on the host:
read -rs ADMIN_KEY                     # paste the operator key; nothing is echoed
curl -s -X POST http://127.0.0.1:8787/v1/operator/merchants \
  -H "Authorization: Bearer $ADMIN_KEY" -H 'content-type: application/json' \
  -d '{"name":"Store","webhookUrl":"https://store.example/hooks","addresses":{"solana":"<merchant wallet>"},"feeBps":50}'

The response contains the merchant's apiKey (sk_live_…) and webhookSecret once. Hand them to the merchant over a secure channel. Then continue with Setting up earnings.