Skip to content

Validate payment creation amounts#6523

Open
YfengJ wants to merge 1 commit into
SecureBananaLabs:mainfrom
YfengJ:codex/payment-positive-amount-validation
Open

Validate payment creation amounts#6523
YfengJ wants to merge 1 commit into
SecureBananaLabs:mainfrom
YfengJ:codex/payment-positive-amount-validation

Conversation

@YfengJ

@YfengJ YfengJ commented Jun 10, 2026

Copy link
Copy Markdown

Closes #6522

/claim #743

Summary

  • Validate POST /api/payments request bodies before creating a payment intent.
  • Reject non-positive, non-numeric, or non-finite amount values with the existing { success: false, message } 400 shape.
  • Keep currency optional with the existing usd default and reject malformed currency codes.
  • Preserve valid payment creation behavior.

Validation

  • node --test src/tests/*.test.js
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Payment creation should reject non-positive amounts (YfengJ reissue via #743)

1 participant