CardForge integration
Run CardForge as a separate merchant template that consumes ZamaPay configuration.
Standalone boundary
CardForge is not part of the ZamaPay platform app. It is a standalone merchant template under `demo/cardforge` and receives only project configuration.
The browser talks to CardForge. CardForge talks to ZamaPay with its project API key. Browser cookies from ZamaPay must not be forwarded.
| Variable | Required | Meaning |
|---|---|---|
| ZAMAPAY_PROJECT_ID | yes | Project id from the merchant console. |
| ZAMAPAY_API_KEY | yes | One-time revealed project API key. |
| ZAMAPAY_WEBHOOK_SECRET | yes | Secret used to verify ZamaPay webhook signatures. |
| ZAMAPAY_API_URL | yes | Rust API base URL, for example http://127.0.0.1:8080. |
| ZAMAPAY_CHAIN_INVOICE_API_URL | yes | ZamaPay web URL used by the backend to create local-dev private chain invoices. |
| CARDFORGE_DATABASE_URL | yes | Independent CardForge Postgres database URL. |
| CARDFORGE_STORE_KEY | optional | Local namespace inside the CardForge database; defaults to local-dev. |
| CARDFORGE_WEBHOOK_ENDPOINT | optional | Defaults to http://127.0.0.1:8092/api/zamapay/webhook. |
| NEXT_PUBLIC_CARDFORGE_API_URL | frontend only | Browser-safe CardForge backend URL. |
| NEXT_PUBLIC_ZAMAPAY_CONSOLE_URL | frontend only | Browser-safe link back to the ZamaPay merchant console. |
CardForge env files
CardForge has two process boundaries. The backend receives secrets from `env/local-dev.cardforge-backend.env`; the frontend receives only browser-safe `NEXT_PUBLIC_*` values from `env/local-dev.cardforge-frontend.env`.
set -a
. env/local-dev.cardforge-backend.env
. env/supabase.cardforge-backend.env # optional database override
set +a
cargo run --manifest-path demo/cardforge/backend/Cargo.toml
set -a
. env/local-dev.cardforge-frontend.env
set +a
npm --prefix demo/cardforge/frontend run dev -- --hostname 127.0.0.1 --port 3002Closed loop proof
Use the local readiness gate for service truth, then run the browser CardForge flow for the private checkout proof. The old direct payment-projection script is intentionally removed.
npm run verify:localReady to wire a merchant project?
Create the project in the console, then keep external checkout creation on the project API-key path.