Middle
Is the interaction synchronous or asynchronous when applying a promo code?
sobes.tech AI
Answer from AI
Applying a promo code is usually implemented synchronously to immediately verify its validity and apply a discount or bonus to the current transaction. This is important for user experience — the customer should see the result right away.
However, in some systems where checking a promo code requires complex calculations or interaction with external services, an asynchronous approach with subsequent user notification may be used.
In most cases, synchronous interaction is preferred because it provides instant feedback and prevents errors during the checkout process.