title: Cashback Balance
type: object
x-tags:
  - Models
description: A separate customer/program monetary cashback pool. Current expiry, archive and
  minimum-redemption state determine availability; additions extend pooled expiry as for stored value.
required:
  - uuid
  - type
  - customer_uuid
  - loyalty_program
  - currency_code
  - timezone
  - balance
  - available_balance
  - usable_from
  - expires_at
  - state
  - is_usable
  - created_at
properties:
  uuid:
    type: string
    format: uuid
  type:
    type: string
    enum:
      - cashback
  customer_uuid:
    type: string
    format: uuid
  loyalty_program:
    $ref: ./LoyaltyProgram.yaml
    description: The program's current name, description, outlet restrictions and configuration.
  currency_code:
    type: string
    minLength: 3
    maxLength: 3
    example: SGD
  timezone:
    type: string
    example: Asia/Singapore
    description: The merchant's IANA time zone.
  balance:
    $ref: ./Money.yaml
    description: The recorded balance. It can include value that has expired but has not yet been cleared.
  available_balance:
    $ref: ./Money.yaml
    description: The amount currently available for redemption, or zero unless state is available. Individual
      redemptions must still meet the program's minimum amount.
  usable_from:
    type: string
    format: date-time
    pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$
    description: When the balance was created. Later top-ups do not change this date.
    example: 2026-10-27T00:00:00Z
  expires_at:
    type:
      - string
      - "null"
    format: date-time
    pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$
  state:
    description: Zero balances report insufficient_balance before expiry or program restrictions.
    type: string
    enum:
      - available
      - expired
      - insufficient_balance
      - archived
      - minimum_redemption_not_met
  is_usable:
    type: boolean
    description: True when state is available. This describes baseline balance availability; redemption still
      checks the PIN, outlet and any conditions that depend on the supplied saving or spend.
  created_at:
    type: string
    format: date-time
    pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$
