Skip to content

Rewards

Modules: Magenx_Reward (points engine) and Magenx_RewardGraphQl (storefront API)

A reward points program. Customers earn points on paid orders and spend them at checkout. Points come back or are taken away when orders are cancelled or refunded. Every point movement is recorded once, with its cause, so a balance can always be rebuilt and checked.

Rewards page in the customer account: available points with their value and expiry, lifetime points, the referral code and points history
Reward points in the customer account.
earnperiod endsredeem at checkoutcancel / refundrefund of earning orderexpiry date

Paid invoice

Pending points
(holding period)

Spendable points

Order discount

Revoked

Expired

EventWhat happens to points
Invoice paidEarns floor(earnable amount × earn rate), once. The points stay pending during the holding period.
Order placedThe points applied at checkout are deducted, the soonest-expiring first. If the balance no longer covers them, the order is refused.
Payment failsThe points come back with their original expiry.
Credit memoReturns its share of redeemed points, and takes back earned points in proportion to the amount refunded.
Order cancelledReturns the redeemed points of the part not yet invoiced.
Customer deletedRemaining points are written off. The history stays, anonymised.

Earnable amount is the merchandise after cart discounts, plus shipping if configured, with or without tax as configured, minus the part paid with points. Earning and refunds use the same calculation, so a full refund brings an order’s points back to zero.

The points discount is applied after tax, like a payment: tax and other discounts don’t change.

  1. Go to Stores > Configuration > Magenx > Reward Points. Settings are per website; the terms text is per store view.
  2. Set the earn rate (points per 1.00) and the redeem rate (value of one point).
  3. Set the holding period to your return window, so points for returned goods are never spent. Set an expiry longer than the holding period, or 0 for never.
  4. Set per-order limits and the share of the cart points may pay.
  5. If points can pay a whole order, enable Zero Subtotal Checkout (payment/free/active) on the website.
  6. Enable the program.

Changes apply to points earned from then on. Points already earned keep the holding period and expiry they were given. Invoices paid before the module was installed never earn points.

Each customer gets a referral code and a share link (?ref=). A friend who uses it gets a single-use coupon, and the referrer earns bonus points. The bonus, the friend’s minimum subtotal, the time window and a monthly cap are set under Refer a Friend.

It needs a Cart Price Rule that can generate coupons: active, coupon type Specific Coupon with Use Auto Generation ticked, on the website. Each friend’s coupon is limited to one use, whatever the rule’s own limits.

Terminal window
bin/magento magenx:reward:reconcile [--website=1] [--fix]
bin/magento magenx:reward:liability --website=1 [--date=2026-12-31]
bin/magento magenx:reward:metrics [--date=2026-12-31] [--website=1]
  • reconcile checks that history, open points and lifetime totals agree for every balance. --fix rebuilds cached balances.
  • liability reports the value of outstanding points, for accounting.
  • Logs go to var/log/magenx_reward.log. Alert on critical lines, and on a job with no log line for 26 hours.

Uninstalling the code keeps the reward tables, so point history survives reinstalls.

Earn on a paid order

  1. A signed-in customer places an order. Nothing is earned yet.
  2. The order is invoiced (paid). The system computes earnable money for that invoice and converts it to points at the earn rate, rounding down.
  3. The points are recorded. If a holding period is set, they are pending; otherwise they are spendable at once.
  4. Each further partial invoice earns once, on its own amount. Re-processing the same invoice earns nothing.

Holding period ends

  1. When the holding period of pending points ends, whatever remains of them joins the spendable balance.
  2. Points that expire before their holding period ends never become spendable; they are written off.

Redeem at checkout

  1. The customer sees their spendable balance and the money it is worth.
  2. They enter a number of points. The system checks: program on, signed in, positive whole number, within min/max, not above the spendable balance (after writing off anything already expired), and not worth more than the cart.
  3. If the request is worth more than the cart, it is reduced to the largest whole number of points the cart can cover.
  4. The discount appears as its own line in the cart totals. The customer can change or remove it.
  5. If the cart later shrinks, the applied points shrink with it; they never discount below zero.

Order placement

  1. At placement the applied points are deducted, points closest to expiry first.
  2. Deduction is all or nothing: if the full amount can no longer be taken, nothing is taken and the order is not placed, with a clear message.
  3. If placement fails after the deduction (for example payment declined), the points are given back automatically.
  4. The redemption is frozen onto the order and carried onto its invoices and refunds.

Cancel an unpaid order

  1. All redeemed points still outstanding on the order are returned.
  2. Nothing is revoked: an order that was never invoiced never earned.

Partial or full refund

  1. A refund document returns the share of redeemed points that it carries.
  2. It revokes earned points in proportion to the earnable money it sends back, including goodwill credits and refund fees.
  3. Revocation takes back the refunded order's own points first — including points still pending — before touching any other points.
  4. A sequence of partial refunds can never return more than was redeemed or revoke more than was earned. The final refund settles any rounding remainder.
  5. If the customer has already spent the points, the system takes back what it can, never goes below zero, and records the shortfall for the merchant.

Expiry

  1. Points past their expiry date are written off, with a recorded movement for each expiry.
  2. Expiry runs on a schedule and also immediately before any spend, refund or balance check that depends on it.
  3. Optionally, customers are told before points expire, counting only points that are still unspent.

Refer a friend

  1. Every customer can get one shareable referral code.
  2. A newly registered customer enters a code within the allowed window and before their first order. They get a single-use welcome coupon.
  3. When the friend's first order is invoiced at or above the minimum, the referrer earns bonus points, subject to the same holding period and expiry as any earned points.
  4. If refunds take that order below the minimum, the unspent part of the bonus is revoked.
  5. A monthly cap limits bonuses per referrer; referrals over it are recorded as rejected.

See my points

  1. A signed-in customer opens the account.
  2. The storefront asks for balance, pending, lifetime, money value and next expiry.
  3. When the program is off, the answer is empty and the storefront hides the section.
  4. Points expired since the last scheduled job are already excluded.

Browse history

  1. The customer pages through history (page size 1–100).
  2. Entries come newest first: type, signed points, balance and pending after, readable reason, expiry for earnings, date and order number.

Redeem at checkout

  1. The cart shows applied points, their value and the most points applicable.
  2. The customer applies points; the engine checks and caps them; the cart comes back with totals already reduced.
  3. Applying again replaces the amount; removing clears it.
  4. A refusal comes back as a message the storefront shows unchanged.

Refer a friend

  1. The customer reads their referral card; the first read creates their code.
  2. A newly registered customer enters a friend's code and receives a welcome coupon code.
  3. Unknown and malformed codes get the same refusal.

Order documents

  1. Orders, invoices and refunds show the points and discount they carry.

These always hold:

  • A customer's spendable balance always equals what their history of earnings, spends, expiries, returns and revocations says it should be. It can be proven at any time and recomputed if it is ever wrong.
  • A balance is never negative, and no single earning is ever spent more than once.
  • Point history is permanent: past movements are never edited or deleted; corrections are new movements.
  • Every movement records its type, signed points, resulting balance, reason, website, store, and the related order, invoice or refund.
  • Concurrent requests for the same customer never spend the same points twice and never lose an update.
  • An order can never carry a points discount whose points were not actually deducted.
  • Points are whole numbers. Every conversion to points rounds down: a partial point is never earned, redeemed or revoked (except the final remainder).
  • Every number equals what the engine reports for the same customer, website and moment.
  • The API never changes points itself; every change is an engine operation.
  • Identity comes only from the session.
  • A cart can only be read or changed by its owner.
  • Earnable money = paid merchandise amount after cart discounts (coupons, promotions), plus shipping if configured, in base currency. Money paid with points does not earn points. Whether the amount includes tax is a setting; default follows how the catalog shows prices.
  • Earned points = floor(earnable money × earn rate).
  • Discount value = points × redemption rate, in base currency. The display-currency amount always matches it at the order's exchange rate.
  • The most points a cart can take = floor(cart value before the points discount ÷ redemption rate), further limited by the per-order maximum and percentage settings.
  • Points revoked by a refund = floor(points the order earned × refunded earnable money ÷ the order's earnable money), capped at what is not yet revoked. The refund that returns the last earnable money revokes the exact remainder.
  • Points returned by a refund = the share of the order's redeemed points that this refund reverses, capped at what is not yet returned. Each invoice and refund shows its share of the points discount; the shares add up to the order's discount, and no document's total goes below zero.
  • Money value = points × redemption rate, converted to display currency.
  • Most applicable = min(floor(cart value before points ÷ redemption rate), per-order maximum, percentage cap, spendable balance).
SituationWhat happens
An order is refunded while the points it earned are still in the holding period.Take back that order's own points first, pending ones included; other points are touched only for any remainder. Nothing from the refunded order activates later.
Points are given back after a cancel, failed payment or refund.Returned points keep the expiry date they had; points already past expiry are not returned as spendable.
Points expire between scheduled job runs.Shown and checked balances exclude them immediately.
Points that were partly spent reach their expiry.Only the unspent part expires; a balance never goes below zero; any clamp to zero raises an alert.
Expiry reminders are sent.They count only unspent points that will actually expire.
An order has several partial refunds.Totals never exceed what was redeemed or earned; the final refund settles rounding exactly.
A refund consists only of a goodwill credit or a fee.Points move in proportion to the money refunded.
The same refund is processed twice.The second processing changes nothing.
An order is paid largely by discounts or by points.Points are earned only on money actually paid.
Expiry is configured shorter than the holding period.The configuration is refused.
The order is in a display currency other than the base currency.Base currency is the authority.
Guest asks for cart points.Empty, no error.
Customer uses another customer's cart reference.Refused; that cart unchanged.
Program switched off while points are applied.Cart points empty; no discount.
Points expired yesterday; job not run.Excluded from the balance.
Page size 0 or 101.Refused.
Code entered twice, by its owner, or after the first order.Refused with a specific message.
Apply / remove faster than the rate limit.Refused until the window passes.
  • Only registered customers earn and redeem. A guest order never earns, even if the guest registers later.
  • Points and settings are per website; a store view inherits its website's program.
  • A customer who is deleted keeps no balance; their point history is anonymised per the data-retention policy.
  • Signed-in customers on the website of the current store view; public settings for everyone.
  • Tiers, VIP levels or milestone programs.
  • Points for non-purchase actions (reviews, sign-up, newsletter, social sharing, birthdays).
  • Per-product or per-category earning rates; selling products for points only.
  • A built-in storefront theme or widgets.
  • Transfer of points between customers, or conversion of points to cash.
  • Customer debt (a negative balance).
  • Admin point management (manual adjustments, admin screens) and any admin or integration API.
  • Any rule or calculation not already in the engine.
  • Admin operations.
  • Points for guests or on guest carts.
  • Caching customer or cart point data.
Terminal window
composer require magenxcommerce/module-reward magenxcommerce/module-reward-graph-ql
bin/magento module:enable Magenx_Reward Magenx_RewardGraphQl
bin/magento setup:upgrade
bin/magento setup:di:compile # production mode only
bin/magento cache:flush
  • PHP ~8.4.0||~8.5.0, Magento 2.4.8.

The program stays off for shoppers until you enable it for a website.

Stores > Configuration > Magenx > Reward Points

General

Signed-in customers earn points when an invoice is paid and spend them at checkout as a deduction from the order total. Points, balances and settings are kept separately per website. Changes apply to points earned from now on; points already earned keep the holding period and expiry they were given.

SettingDefaultScopeNotes
Enable Reward Points
magenx_reward/general/enabled
NoWebsiteYes/No. Off: nothing is earned or redeemed on this website, and the storefront API returns no points. Existing balances and history are kept.
Program Terms
magenx_reward/general/terms
emptyStore viewText area. Shown when Enable Reward Points = Yes. Shown by the storefront next to the points balance (expiry, holding period, cash value). Plain text; translate per store view.

Earning

SettingDefaultScopeNotes
Points per 1.00 of Base Currency
magenx_reward/earning/rate
1WebsiteText. Points = floor(earnable money × this rate). 0 = nothing is earned.
Earn on Shipping
magenx_reward/earning/include_shipping
NoWebsiteYes/No. No: merchandise only. Yes: merchandise plus shipping. Money paid with points never earns points.
Earn on Tax
magenx_reward/earning/tax_basis
catalogWebsiteDropdown. Whether earnable money includes tax. "Follow catalog price display" uses the website's Tax > Price Display Settings.
Holding Period (Days)
magenx_reward/earning/hold_days
0WebsiteText. Days newly earned points stay pending (visible, not spendable). Set it to the return window. 0 = spendable at once.
Expiry (Days)
magenx_reward/earning/expiry_days
0WebsiteText. Days after earning when unspent points are written off. 0 = never. Must be longer than the holding period when both are set.

Redemption

SettingDefaultScopeNotes
Value of One Point (Base Currency)
magenx_reward/redemption/rate
0.01WebsiteText. E.g. 0.01 makes 100 points worth 1.00. 0 = points cannot be redeemed.
Minimum Points per Order
magenx_reward/redemption/min_points
0WebsiteText. 0 = no minimum.
Maximum Points per Order
magenx_reward/redemption/max_points
0WebsiteText. 0 = no maximum. Must not be lower than the minimum.
Maximum Share of the Cart (%)
magenx_reward/redemption/max_percent
100WebsiteText. The most of the cart value points may pay for. 100 = the whole cart.
Points May Pay for Shipping and Tax
magenx_reward/redemption/cover_shipping_tax
YesWebsiteYes/No. Yes: the cart value is the order total. No: the cart value is merchandise after discounts, excluding shipping and tax.

Cancellations and Refunds

SettingDefaultScopeNotes
Return Redeemed Points on Refund
magenx_reward/refund/return_redeemed
YesWebsiteYes/No. A credit memo gives back the share of redeemed points it carries. Cancelled unpaid orders and failed placements always give points back.
Revoke Earned Points on Refund
magenx_reward/refund/revoke_earned
YesWebsiteYes/No. A credit memo takes back points in proportion to the earnable money it refunds (goodwill credits and fees included). The balance never goes below zero; anything not recovered is logged.

Refer a Friend

The friend enters the referrer's code soon after registering and gets a single-use coupon generated from the Cart Price Rule below. The referrer earns bonus points when the friend's first order is invoiced at or above the minimum.

SettingDefaultScopeNotes
Enable Refer a Friend
magenx_reward/referral/enabled
NoWebsiteYes/No.
Referrer Bonus (Points)
magenx_reward/referral/bonus_points
0WebsiteText. Shown when Enable Refer a Friend = Yes. Subject to the same holding period and expiry as earned points.
Welcome Coupon Rule
magenx_reward/referral/coupon_rule_id
0WebsiteDropdown. Shown when Enable Refer a Friend = Yes. An active Cart Price Rule with "Specific Coupon" and "Use Auto Generation" ticked. Each friend gets one generated coupon, usable once whatever the rule's own usage limits. No rule: codes are refused.
Minimum Qualifying Order (Base Currency)
magenx_reward/referral/min_subtotal
0WebsiteText. Shown when Enable Refer a Friend = Yes. Earnable money the friend's first order must reach. If refunds take it below this, the unspent part of the bonus is revoked.
Code Entry Window (Days After Registration)
magenx_reward/referral/window_days
30WebsiteText. Shown when Enable Refer a Friend = Yes.
Bonuses per Referrer per Month
magenx_reward/referral/monthly_cap
0WebsiteText. Shown when Enable Refer a Friend = Yes. Referrals over the cap are recorded as rejected. 0 = no cap.

Expiry Reminder

SettingDefaultScopeNotes
Send Expiry Reminders
magenx_reward/notification/expiry_reminder
NoWebsiteYes/No. Emails customers before points expire, counting only unspent points that will expire. Sent in the customer's store language.
Days Before Expiry
magenx_reward/notification/reminder_days
7WebsiteText. Shown when Send Expiry Reminders = Yes.
Email Template
magenx_reward/notification/reminder_template
Module's default templateStore viewDropdown. Shown when Send Expiry Reminders = Yes.
Email Sender
magenx_reward/notification/sender
General ContactStore viewDropdown. Shown when Send Expiry Reminders = Yes.

Schedules

Cron expressions. Correctness never depends on these jobs: balances shown and checked always exclude expired points and include ended holding periods. The jobs write the expiry history, refresh cached balances and retry failed processing.

SettingDefaultScopeNotes
Expiry Job
magenx_reward/cron/expire_schedule
17 * * * *GlobalText.
Activation Job (Holding Period Ends)
magenx_reward/cron/activate_schedule
23 * * * *GlobalText.
Retry Job (Failed Earning / Refund Processing)
magenx_reward/cron/retry_schedule
*/15 * * * *GlobalText.
Reconciliation Job
magenx_reward/cron/reconcile_schedule
41 3 * * *GlobalText.
Expiry Reminder Job
magenx_reward/cron/reminder_schedule
11 9 * * *GlobalText.

Grant these under System > Permissions > User Roles > Role Resources:

ResourceUnderID
Reward Points SectionStores > Settings > ConfigurationMagenx_Reward::config
JobGroupDefault scheduleChange it at
magenx_reward_expiredefault17 * * * *magenx_reward/cron/expire_schedule
magenx_reward_activatedefault23 * * * *magenx_reward/cron/activate_schedule
magenx_reward_retrydefault*/15 * * * *magenx_reward/cron/retry_schedule
magenx_reward_reconciledefault41 3 * * *magenx_reward/cron/reconcile_schedule
magenx_reward_reminderdefault11 9 * * *magenx_reward/cron/reminder_schedule

Everything here needs a customer token. A customer can only change their own cart. Cart mutations and referral codes are rate-limited, and unknown referral codes get the same message as malformed ones, so codes can’t be probed. Order, invoice and credit memo totals are already net of the points discount.

With GDPR installed, the personal data export includes reward points and their history.

Mutations

applyRewardPointsToCart(input: ApplyRewardPointsToCartInput!): ApplyRewardPointsToCartOutput

Apply reward points to the signed-in customer's cart. Replaces any points already applied. A request worth more than the cart is reduced to the most points the cart can take.

ArgumentTypeDescription
inputApplyRewardPointsToCartInput!The cart and the points to apply.
removeRewardPointsFromCart(input: RemoveRewardPointsFromCartInput!): RemoveRewardPointsFromCartOutput

Remove applied reward points from the signed-in customer's cart.

ArgumentTypeDescription
inputRemoveRewardPointsFromCartInput!The cart.
applyRewardReferralCode(input: ApplyRewardReferralCodeInput!): ApplyRewardReferralCodeOutput

Enter a friend's referral code and receive a single-use welcome coupon. Signed-in customers only, once, soon after registering and before their first order.

ArgumentTypeDescription
inputApplyRewardReferralCodeInput!The friend's code.

Fields added to Magento types

FieldTypeDescription
Customer.reward_pointsCustomerRewardPointsThe signed-in customer's reward points on the current website. Null when the program is off.
Cart.reward_pointsCartRewardPointsReward points on this cart. Null for guest carts or when the program is off.
CustomerOrder.reward_pointsSalesRewardPointsReward points redeemed on this order and the discount they gave. Null when none were used. total.grand_total is already net of it.
StoreConfig.reward_points_enabledBooleanWhether the reward points program runs on this store's website.
StoreConfig.reward_points_earn_rateFloatPoints earned per 1.00 of base currency of earnable money.
StoreConfig.reward_points_redeem_rateFloatBase-currency value of one point.
StoreConfig.reward_points_min_per_orderIntMinimum points per order; 0 = no minimum.
StoreConfig.reward_points_max_per_orderIntMaximum points per order; 0 = no maximum.
StoreConfig.reward_points_max_cart_percentIntThe most of the cart value points may pay for, in percent.
StoreConfig.reward_points_hold_daysIntDays newly earned points stay pending; 0 = spendable at once.
StoreConfig.reward_points_expiry_daysIntDays after earning when unspent points expire; 0 = never.
StoreConfig.reward_points_termsStringProgram terms text to show customers.
StoreConfig.reward_referral_enabledBooleanWhether refer-a-friend is switched on. Only effective when reward_points_enabled is true.

Types

type CustomerRewardPoints - A customer's reward points on one website.
FieldTypeDescription
balanceInt!Spendable points: earned, past their holding period, not expired and not spent.
pendingInt!Points still in their holding period: visible, not yet spendable.
lifetime_earnedInt!Total points ever earned on this website.
balance_valueMoney!What the spendable points are worth, in the store's display currency.
next_expiryRewardPointsExpiryThe next date unspent points expire and how many, or null when none expire.
historyRewardPointsHistoryEvery point movement, newest first.
referralRewardReferralThe customer's refer-a-friend card. Null when refer-a-friend is off. The first read creates the customer's code.
type RewardPointsExpiry - Points that expire on a date.
FieldTypeDescription
dateString!Expiry date, YYYY-MM-DD (UTC).
pointsInt!Unspent points expiring that day.
type RewardPointsHistory - A page of point movements.
FieldTypeDescription
items[RewardPointsMovement!]!Movements on this page, newest first.
total_countInt!Number of movements in the whole history.
page_infoSearchResultPageInfo!Pagination metadata.
type RewardPointsMovement - One recorded change of a customer's points. Never edited after it is recorded.
FieldTypeDescription
idID!Movement ID.
typeRewardPointsMovementType!What caused the movement.
pointsInt!Signed change of points held (pending plus spendable).
balance_afterInt!Spendable points right after the movement.
pending_afterInt!Pending points right after the movement.
reasonString!Customer-readable reason, in the store's language, e.g. "Earned on order #1001".
expires_atStringFor earnings: when these points expire (UTC), or null when they never do.
created_atString!When the movement was recorded (UTC).
order_numberStringThe related order number, when there is one.
enum RewardPointsMovementType - What caused a point movement.
ValueDescription
EARNEarned on a paid invoice.
REFERRAL_BONUSBonus for a referred friend's first order.
REDEEMSpent as a discount on an order.
RETURNSpent points given back: order cancelled, not placed, or refunded.
REVOKEEarned points taken back because the money that earned them was refunded.
EXPIREUnspent points written off at expiry or account closure.
type RewardReferral - A customer's refer-a-friend card.
FieldTypeDescription
codeString!The customer's shareable code.
bonus_pointsInt!Points the customer earns when a friend's first qualifying order is invoiced.
invited_countInt!Customers who entered this customer's code.
rewarded_countInt!Referrals that paid this customer a bonus.
points_earnedInt!Bonus points earned from referrals (revoked bonuses excluded).
received_couponStringThe single-use coupon this customer received for entering a friend's code, if they did.
can_apply_codeBoolean!Whether this customer can still enter a friend's code: once, soon after registering, before their first order.
type CartRewardPoints - Reward points applied to a cart, and how many more it could take.
FieldTypeDescription
applied_pointsInt!Points applied; 0 when none.
applied_valueMoney!Discount the applied points give, in the cart currency. Already deducted from prices.grand_total.
max_applicable_pointsInt!The most points this cart can take right now: limited by the cart value, the per-order maximum and the customer's spendable balance.
type Invoice
FieldTypeDescription
reward_pointsSalesRewardPointsThe share of the order's points discount this invoice carries. Null when none.
type CreditMemo
FieldTypeDescription
reward_pointsSalesRewardPointsThe share of the points discount this credit memo gives back. Null when none.
type SalesRewardPoints - The points discount on an order, invoice or credit memo.
FieldTypeDescription
pointsInt!Points the document carries.
amountMoney!Discount value in the order currency.
type GdprPersonalDataExport
FieldTypeDescription
reward_points[GdprExportRewardPoints]The customer's reward points balance and full point history on each website.
type GdprExportRewardPoints - Reward points on one website, for a personal data export.
FieldTypeDescription
website_codeString!Website the points belong to.
balanceInt!Spendable points.
pendingInt!Points in their holding period.
lifetime_earnedInt!Total points ever earned.
history[GdprExportRewardMovement!]!Every point movement, oldest first.
type GdprExportRewardMovement - One point movement, for a personal data export.
FieldTypeDescription
typeString!earn, referral, redeem, return, revoke or expire.
pointsInt!Signed change of points held.
balance_afterInt!Spendable points after.
pending_afterInt!Pending points after.
reasonString!Readable reason.
order_numberStringRelated order number, if any.
created_atString!When it was recorded (UTC).
input ApplyRewardPointsToCartInput - Input of applyRewardPointsToCart.
FieldTypeDescription
cart_idString!The masked ID of the signed-in customer's cart.
pointsInt!Whole number of points to apply, greater than zero.
type ApplyRewardPointsToCartOutput - Output of applyRewardPointsToCart.
FieldTypeDescription
cartCart!The updated cart.
input RemoveRewardPointsFromCartInput - Input of removeRewardPointsFromCart.
FieldTypeDescription
cart_idString!The masked ID of the signed-in customer's cart.
type RemoveRewardPointsFromCartOutput - Output of removeRewardPointsFromCart.
FieldTypeDescription
cartCart!The updated cart.
input ApplyRewardReferralCodeInput - Input of applyRewardReferralCode.
FieldTypeDescription
codeString!The friend's referral code. Case, spaces and dashes are ignored.
type ApplyRewardReferralCodeOutput - Output of applyRewardReferralCode.
FieldTypeDescription
coupon_codeString!The single-use welcome coupon issued to the customer.
TermMeaning
PointWhole-number unit of reward. Never fractional.
Program scopePoints, balances and settings are kept separately per website (sales channel). A customer's points on one website cannot be spent on another.
Point historyPermanent record of every point movement for a customer.
MovementOne record in the point history: who, how many points (signed), why, when, linked order / invoice / refund, balance after.
EarningPoints credited in one event (an invoice or a referral bonus). Each earning has its own expiry date and holding period.
Spendable balancePoints the customer can use now: earned, past their holding period, not expired and not yet spent.
Pending pointsEarned points still inside the holding period. Visible, not spendable.
Holding periodDays newly earned points stay pending. Doubles as the return window.
ExpiryThe date after which an earning's unspent points are written off.
EarnPoints awarded for paid money on an invoice.
RedeemPoints spent as a discount on an order.
ReturnRedeemed points given back because the order was cancelled, failed or refunded.
Revoke (clawback)Earned points taken back because the money that earned them was refunded.
Redemption rateMoney value of one point, in the website's base currency.
Earn ratePoints earned per one unit of base currency of earnable money.
Earnable moneyThe part of a paid amount that earns points (see business rules).
ReferralA link between a referrer and a new customer (the friend) who entered the referrer's code.
SessionThe signed-in customer's authenticated session; the only source of identity.
Cart referenceThe opaque identifier the storefront holds for a cart.
Money valuePoints × redemption rate, in the store's display currency.
Most points applicableThe most points the cart can take now, limited by cart value, per-order maximum, percentage limit and spendable balance.
Referral cardThe customer's own code with referral counts and earnings.