Wallets

Wallet types, the units members earn and spend, and the balances each wallet keeps.

A wallet type is a unit system in your loyalty program, such as points, credits or cashback. Each one works as a separate currency that members earn and spend. When you create a wallet type, every existing member automatically gets a wallet of that type.

Everything that involves units goes through wallets: earning from campaigns, paying with points at checkout, buying rewards and progressing through tiers.

Wallets

How wallets work

You define a wallet type with a name, a code and the unit labels, for example "Points" with the code POINTS. Members get a wallet for each wallet type without any manual assignment, so a member can hold several wallets, one per type.

Every change to a wallet is recorded as a unit transfer: units added, spent, blocked, unblocked, canceled or expired.

Balances

Each wallet tracks four balances:

  • Active units are available to spend.
  • Pending units are earned but not available yet, for example points from a campaign with a 30-day delay.
  • Blocked units are held for an order that isn't finished yet.
  • Total spent units are everything the member has spent over time.

Default wallet type

One wallet type is the default. Scops Loyalty uses it whenever a request doesn't name a wallet, for example when a member pays with points at checkout, and imported members' points go into it.

Unit value

Unit value is what one unit is worth in money when a member pays with points. With 0.5, two points pay for one unit of currency, so 1,000 points take 500 RSD off. Leave it empty for 1:1.

Expiration

Units can expire, but only when they're given an expiry date. A campaign's Add units action can set when the units expire, and units added through POST /unit-transfers/add can have an expiresAt. Units without an expiry date never expire. Scops Loyalty checks for expired units every 5 minutes and removes them from the active balance.

The wallet type form also has Default unit pending and Default unit expiration fields. They are saved with the wallet type, but campaigns don't apply them, so set the delay and the expiry on each campaign action.

Limits

  • Total unit limit caps how many units can be added across all members.
  • Member unit limit caps how many units one member can receive.

A transfer that would go over a limit is rejected.

Tips

  • Plan your wallet types up front. Renaming or removing them later affects historical data and balances.
  • Use clear names, such as "Gold Points", and unit labels members recognize.
  • Keep codes short and consistent, such as GOLD, CREDIT or CASHBACK.

Example: earning and spending units

A member makes a 10,000 RSD purchase, and a campaign that gives 1 point per 100 RSD adds 100 points. A unit transfer adds +100 units to the member's "Points" wallet.

On the next purchase the member pays with 50 points. With a unit value of 1, that takes 50 RSD off the bill, and a unit transfer of -50 units is linked to the transaction.