feat(web): add a payment initiation form to the payments screen - #300
Merged
Conversation
Let an operator open a payment from the dashboard: a toggled form takes an amount, a currency from the supported set and a reference, validates them against the backend constraints client-side, and posts to the payments API with a per-submit idempotency key so an accidental retry of the same intent is deduped rather than charged twice. The shared post helper now carries a JSON body and custom headers while keeping the dev bearer authoritative. On success the list refetches and the form closes; failures surface a dismissable alert. Closes #299
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
E-08 Sandbox UI #299 (289c) - payment initiation form (follow-up to the payments list #289b). Reuses the #297 write-UI pattern.
What
Idempotency (money-path)
The Idempotency-Key is generated per user intent at the mutate() call and passed into the mutation, so a retry of the same submit reuses the key and the backend dedupes it - an accidental retry is not a second payment. (code-reviewer MEDIUM, applied.)
Gate chain
Web gates green: lint 0 errors, typecheck, vitest 63 passed (3 new), build.
Closes #299