Skip to main content

Reference implementation

A small, self-contained Node application that plays a complete organisation — both sides of every contract in these docs — with a dashboard UI. Ask your integration contact for the download; run it in two minutes:

npm install
PARTNER_API_BASE=https://<sandbox-host> \
LENDER_CODE=YOURORG \
API_KEY_ID=pk_yourorg_test_xxx \
HMAC_SECRET=<your sandbox secret> \
npm start
# → http://localhost:4747

What it demonstrates (copy the code freely)

ContractWhere in the code
Request signing + every API callthe sign() / quikkred() client
A correct webhook receiver — signature verify over raw bytes, eventId dedupe, per-loan sequence ordering with gap detection, absolute-value applicationPOST /webhooks/quikkred
The pull API contractGET /overdue-cases
The Mode B mint-link contract + confirm callPOST /payment-links + the pay page

The dashboard shows a mock loan book that updates itself purely from webhook payloads — which is exactly the behaviour your production integration should have. Its isolated JSON store never touches your systems.

For webhooks to reach it from the sandbox, expose it with any HTTPS tunnel (npx localtunnel --port 4747, ngrok, VS Code dev tunnels) and register that URL as your callback.