Skip to content

Add isolated pn_test sandbox API keys for limited merchants - #30

Merged
PDFly-source merged 12 commits into
mainfrom
feat/limited-sandbox-api-keys
Dec 1, 2026
Merged

PDFly-source merged 12 commits into
mainfrom
feat/limited-sandbox-api-keys

Conversation

@PDFly-source

Copy link
Copy Markdown
Owner

Summary

  • Adds a separate sandbox_api_keys table; live api_keys remain untouched.
  • Allows verified limited-access merchants to create, list and revoke pn_test_ keys (max 5 active; plaintext shown once).
  • Adds API-key-authenticated sandbox-only endpoints: GET /api/v1/sandbox/me and POST /api/v1/sandbox/checkouts.
  • Adds merchant dashboard controls for LocalProof/development use.
  • Adds regression tests and additive migration 0030; wires migration into staging and guarded production workflows.

Safety

  • Sandbox keys are stored as SHA-256 hashes and never inserted into live api_keys.
  • Sandbox endpoints write only to merchant_sandbox_checkouts; they do not create live orders, transactions, payment attempts, fulfilments or ledger entries.
  • Existing live API key authentication remains restricted to active merchants.
  • Production workflow still requires the existing DEPLOY-PRODUCTION release gate.

Validation

  • CI runs node --check and the complete Worker test suite; staging deployment is isolated from production.

@PDFly-source
PDFly-source merged commit 817cc34 into main Dec 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant