The best way to create a coherent loyalty program is to connect customer spending with the rewards you offer. This approach centers on our earning flow: "Credit points for purchases."
Our prebuilt earning flow is easy to set up; you only need to define the percentage of each purchase that you want to return to your customers. This amount will be added to their point balance. We define this as a percentage of the total purchase because we believe the best loyalty programs have straightforward rules. There is nothing simpler than converting a percentage of a purchase into points that are credited directly to their account.

How is the earning calculated?¶
As we mentioned before, we use a percentage of the total purchase as the total number of points to credit to the user. This functions like a cashback system, but it rewards users with points instead.
The process to calculate the total follows these steps, and it is important to follow them to avoid misunderstandings.
- Get the total amount of the purchase, including tax.
- If the currency is not the program's default, convert it to the default currency in real time
- Get the percentage of the credit points from the purchase flow and apply it to this total
- Round this total using the rounding strategy defined in the earning flow
- Give the points to the customer's balance
How to handle returns?¶
The earning flow handles the returns itself. Each point given for that purchase can be removed if the customer returns part or all of the purchase.
Let do an example: The merchant has our earning flow enabled and provides credit points equal to 15% of each purchase, using a rounding method that rounds up. A customer bought 3 products with this ammounts:
-
Product A for $100
-
Product B for $130
-
and Product C for $59
The total amount is $289. A 15% points-back on this total is $43.35, which rounds up to 44 points added to the customer's balance. After a couple of weeks, the customer returns Product B. The calculation is -$130 x 15% = -$19.50, which rounds to -20 points. Now, the customer will have 24 points in their account.
This applies to returns and complete cancellations of purchases, both online and in-store.
Adding a Holding Period¶
To further secure your margins, you can now implement a Holding Period within this flow. This defines the specific number of days points remain "on hold" (tracked but not yet redeemable) before they move to the customer's spendable balance.
- Strategic Use: We recommend setting the holding period to match your store's return window (e.g., 15 or 30 days).
- Safety Net: This ensures that if a return occurs during the holding period, the points are adjusted or removed before the customer has the chance to spend them, effectively preventing "point-and-return" abuse.