Unit transfers
The record of every change to a member's wallet, with its types, statuses and causes.
A unit transfer is a record of one change to a member's wallet. Every event that changes a balance creates a unit transfer, whether it adds, spends, blocks or expires units. Together they form the audit trail behind every balance.

Types
| Type | What it does |
|---|---|
add | Adds units, for example points for a purchase or a bonus. |
spend | Takes units out, for example when a member pays with points or buys a reward. |
block | Holds units for an order that isn't finished yet. |
unblock | Releases held units back to the member, for example when an order is canceled. |
expire | Removes units whose expiry date has passed. |
Statuses
| Status | Meaning |
|---|---|
pending | Created, but not applied yet. Added units with a delay stay pending until the delay ends, and they count as pending units in the wallet until then. |
completed | Applied to the balance. |
canceled | Reversed before it was applied, for example pending points canceled by a return. |
expired | The units reached their expiry date and left the active balance. |
Scops Loyalty checks pending and expiring transfers every 5 minutes. Pending units whose delay has ended become active, and units past their expiry date are removed.
Causes
Each transfer records what caused it:
campaign: a campaign action.transaction: a purchase, a return, or points used at checkout.reward: a reward the member bought with units.admin: a manual change in the dashboard, or the opening balance of an imported member.
When you add units through the API, you choose the cause yourself.
The causeIdentifier links the transfer to its source, usually the transaction's documentIdentifier. That link is how a return finds the points of the original purchase.
Examples
Earning units from a campaign
- A member makes a 10,000 RSD purchase.
- A campaign that gives 1 point per 100 RSD matches it and calculates 100 units.
- A unit transfer is created with
type: add,cause: campaignandstatus: completed, orstatus: pendingif the campaign has a delay. - The wallet gets +100 active or pending units.
Paying with points at checkout
- The member has 150 active units and wants to use 100 of them.
- The register sends the transaction with
usedBenefits.units.amount: 100. - A unit transfer is created with
type: spend,cause: transactionandstatus: completed. - The wallet loses 100 units, and the discount is on the transaction.
Tips
- Reconcile balances against the transfer log regularly.
- Use the metadata on each transfer to trace where it came from.