RevKeen Docs

Managing Balances

Credit, debit, and manage customer wallet balances with transaction history and lot tracking

Manage customer wallet balances through the dashboard or API. Every balance change is tracked as a transaction with full audit history.

Credit Wallet (Add Funds)

Add funds to a customer's wallet in three ways:

From the Dashboard

  1. Go to Customers and select a customer
  2. Open the Wallet tab
  3. Click Credit Wallet
  4. Enter the amount, select the funding type, and add an optional description
  5. Click Confirm

Via Wallet Code Redemption

Customers redeem wallet codes through the Customer Portal or at checkout. See Wallet Codes for details.

Via the API

POST /v2/wallet/customers/{customerId}/credit
Content-Type: application/json

{
  "amountCents": 5000,
  "currency": "GBP",
  "sourceType": "manual",
  "fundingType": "cash",
  "description": "Loyalty reward"
}

Response:

{
  "transactionId": "wt_abc123",
  "balanceCents": 7500,
  "lotId": "wl_def456"
}

Debit Wallet (Remove Funds)

Debit funds manually or automatically at checkout.

Manual Debit (Dashboard)

  1. Open the customer's Wallet tab
  2. Click Debit Wallet
  3. Enter the amount and reason
  4. Click Confirm

Manual Debit (API)

POST /v2/wallet/customers/{customerId}/debit
Content-Type: application/json

{
  "amountCents": 2000,
  "currency": "GBP",
  "sourceType": "manual",
  "description": "Correction"
}

Debits fail with a 422 error if the customer has insufficient balance.

Transaction History

Every wallet operation creates a transaction record. View the full history in the customer's Wallet tab or via the API.

Transaction Fields

FieldDescription
typecredit or debit
amountCentsAmount in minor units
sourceTypeOrigin: manual, checkout, code_redemption, refund, system
fundingTypeBalance category: cash, promotional, code_redemption, refund
descriptionHuman-readable note
createdAtTimestamp
lotIdAssociated wallet lot (for credits)

Query via API

GET /v2/wallet/customers/{customerId}/transactions?limit=50&offset=0&type=credit

Wallet Lots

Credits are tracked as lots — individual balance entries with optional expiry dates. When a debit occurs, lots are consumed in FIFO order (oldest first).

Lot Fields

FieldDescription
idUnique lot identifier
originalAmountCentsAmount when created
remainingAmountCentsCurrent remaining balance
fundingTypeBalance category
expiresAtOptional expiry date (null = never expires)
statusactive, depleted, expired

Expired lots are automatically marked by a daily cron job. The remaining balance of expired lots is forfeited.

Holds (Reservations)

Holds reserve wallet balance during checkout to prevent double-spending.

Hold Lifecycle

  1. Create hold — Reserves amount from available balance
  2. Capture hold — Converts hold to a debit (payment confirmed)
  3. Release hold — Returns held amount to available balance (checkout abandoned)

Create Hold (API)

POST /v2/wallet/customers/{customerId}/hold

{
  "amountCents": 3000,
  "currency": "GBP",
  "reference": "inv_abc123"
}

Capture Hold

POST /v2/wallet/customers/{customerId}/hold/{holdId}/capture

Release Hold

POST /v2/wallet/customers/{customerId}/hold/{holdId}/release

Holds expire automatically after 30 minutes if neither captured nor released.

On this page