-
-
Notifications
You must be signed in to change notification settings - Fork 65
Description
Originally posted by @loicginoux in #307 (comment)
To Reproduce
- Create an order with a total of $50
- Apply store credits of $49.70 to the order
- Attempt to complete the order using Stripe as the payment method
Current behavior
Currently, when store credits are applied and they cover almost all of the order, it can leave a balance that's insufficient for Stripe to process.
For instance, if we have an order total of $50, and store credits of $49.70 are applied, the remaining amount to pay is $0.30. However, Stripe requires a minimum of $0.50 to process a payment, resulting in a Stripe::InvalidRequestError - Amount must be at least €0.50 $.
Expected behavior
The system should handle scenarios where store credits leave a balance that falls below the minimum payment threshold of the payment gateway (Stripe, in this case).
The customer should not be left with a balance that they cannot pay.
Screenshots
In this specific example, the order total is < 0.50$

Additional context
The current logic covers scenarios where an order is fully covered by store credits,, but fails to handle cases where store credits almost fully cover the order, leaving a balance that's below the minimum payment threshold for certain payment methods.
We need to figure out how to manage this situation, particularly as different currencies, other than USD, have varying minimum amounts.