You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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$
here are the Ideas we had to solve this (in the configuration where you only have Stripe as a payment method), but none of them seems perfect:
1 - you don't let payment when total is < 0.50$ but might be hard to accept for customers, it's not really a good commercial gesture.
2 - you offer these few cents in different ways:
2.a Via a store credit added to user during checkout. The problem is if he does not complete the order, you need to remove these store credits
2.b Via a new sort of promotion "if order total is < 0.50$ then add a promo adjustment equal to this amount to make the order total == 0". The issue we see is that with this kind of promotion, we would need to be sure to check elligibility after all other potential promotions ( I still need to investigate but I don't think this is possible to ensure priorities)
2.c Via an adjustment of the amount remaining added when completing the order. seems hacky...
FWIW, we encountered this issue in our application, and chose to solve it by issuing new store credit with a special type. In practice, we observed that this amount is generally extremely small, and not worth worrying over. By having a custom type of store credit, we can run reports and determine if we need any special handling.
Applying this credit seems like it might be beyond the scope of the Stripe gem, however. We implemented it by replacing the add_store_credit method of Spree::Order with a custom implementation.
Originally posted by @loicginoux in #307 (comment)
To Reproduce
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.
The text was updated successfully, but these errors were encountered: