Your first integration
Make API calls from your backend. Replace the origin with your environment URL; https://magnum.lat is the intended production domain, not a deployment claim.
Prepare local development
pnpm install --frozen-lockfile
pnpm setup:local
docker compose -f compose.dev.yaml up -d --wait
pnpm db:generate
pnpm db:deploy
pnpm bootstrap
pnpm dev
Bootstrap writes a development credential to .local/ with restricted permissions. Open it only in your environment and load the key as MAGNUM_API_KEY in your backend. Never put it in source code, repositories, HTML, or messages.
Register an integration
curl http://localhost:3100/v1/integrations \
-H "Authorization: Bearer $MAGNUM_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"name":"My store","environment":"sandbox","allowedOrigins":["http://localhost:3000"],"allowedNetworks":["ethereum","base"]}'
Keep the returned data.id. Origins must be exact: scheme, hostname, and port are part of authorization.
Create a session
curl http://localhost:3100/v1/checkout-sessions \
-H "Authorization: Bearer $MAGNUM_API_KEY" \
-H 'Idempotency-Key: order-demo-2026-0001' \
-H 'Content-Type: application/json' \
-d '{"integrationId":"YOUR_ID","amount":"100.00","network":"base","parentOrigin":"http://localhost:3000"}'
Open data.checkoutUrl or use the frame SDK. Its URL fragment carries a temporary capability: treat the entire URL as a session secret.
Verify the result
Complete the checkout simulation and retrieve its session using your backend key. The sandbox_completed state demonstrates the integration and never represents received funds.