Skip to content

Fix Stripe verification failures caused by rounding crypto payments up - #899

Draft
ksn-stripe wants to merge 1 commit into
wevm:mainfrom
ksn-stripe:ksn-stripe/floor-crypto-paymentintents
Draft

ksn-stripe wants to merge 1 commit into
wevm:mainfrom
ksn-stripe:ksn-stripe/floor-crypto-paymentintents

Conversation

@ksn-stripe

Copy link
Copy Markdown
Contributor

Fractional-cent crypto payments can fail Stripe transaction verification because the SDK rounds the PaymentIntent amount up. For example, a $0.015 payment creates a 2-cent PaymentIntent, but Stripe floors the on-chain amount to 1 cent and rejects the mismatch with invalid_amount.

Floor the amount to whole cents using integer division so it matches Stripe's comparison. The implementation changes two lines, with four boundary regression cases and a patch release note.

Validation: the $0.015 and $0.019999 regression cases failed before the fix. After the fix, the Stripe suite passed (116 tests; 7 integration tests skipped), along with lint, formatting, and TypeScript checks. No live payment was run.

…on failures

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
@pkg-pr-new

pkg-pr-new Bot commented Sep 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/mppx@899

commit: 94472bd

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