Skip to content

feat(merchant): api key creation, rotation, revocation, and metadata inspection - #1004

Merged
levoski1 merged 1 commit into
WHEELBACK:mainfrom
hannyloveworld:hannyloveworld/merchant-api-keys-management
Oct 21, 2026
Merged

levoski1 merged 1 commit into
WHEELBACK:mainfrom
hannyloveworld:hannyloveworld/merchant-api-keys-management

Conversation

@hannyloveworld

Copy link
Copy Markdown
Contributor

Description

This pull request enables authorized merchants to securely manage their protocol API authentication credentials:

  • API Key Creation: Merchants can generate unique API keys (ch_...) with SHA-256 hash storage in MongoDB. In accordance with the acceptance criteria, the plaintext secret is returned strictly once at creation and is never exposed thereafter.
  • Rotation: Merchants can rotate active API keys via POST /api/merchant-keys/rotate or with the rotate flag, revoking existing active keys and issuing a new secret.
  • Revocation: Merchants and administrators can revoke active keys via DELETE /api/merchant-keys/:keyId.
  • Metadata Inspection: Merchants can inspect key metadata including key_id, created_at, revoked_at, is_active, and last_used_at timestamps (tracked automatically upon authenticated API requests in requireMerchantApiKey).
  • UI & State Handling: Provides an intuitive ApiKeyManagement component in the frontend with explicit authorization banners, loading indicators, graceful error handling, secret reveal warning dialogs with one-click copy, and confirmation modals for rotation and revocation.

Closes #946, Closes #945, Closes #944, Closes #943

…inspection

Let authorized merchants create, rotate, and revoke API keys and inspect last-used metadata. Acceptance: secrets are shown only at creation and the UI handles authorization and error states.

Closes WHEELBACK#946, Closes WHEELBACK#945, Closes WHEELBACK#944, Closes WHEELBACK#943
@drips-wave

drips-wave Bot commented Oct 21, 2026

Copy link
Copy Markdown

@hannyloveworld Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@levoski1
levoski1 merged commit 4faee46 into WHEELBACK:main Oct 21, 2026
1 of 12 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

2 participants