4ac62551f4
The payment amount input was capped at BalanceDue (e.g. $5.00) but the customer was being charged TotalWithSurcharge (e.g. $5.15), causing validation to reject any attempt to pay the correct total amount. Input now defaults to and accepts up to TotalWithSurcharge. On submit, the JS back-calculates the base amount before sending to the server so the server-side surcharge addition produces the same PaymentIntent total that the Stripe Elements were initialized with — eliminating the amount-mismatch error from Stripe on confirmation. Also calls elements.update() when the amount changes so partial payments don't cause an Elements/PaymentIntent amount mismatch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>