title: Stored Value Configuration
type: object
x-tags:
  - Models
description: Represents the configuration for a stored-value loyalty program.
required:
  - minimum_redemption_per_order
  - top_up_validity_period_in_days
  - custom_top_up_amounts
  - preset_top_up_amounts
  - top_up_bonuses
properties:
  minimum_redemption_per_order:
    oneOf:
      - type: 'null'
      - $ref: ./PositiveMoney.yaml
    description: The minimum amount the customer must redeem when paying for an order.
  top_up_validity_period_in_days:
    type:
      - integer
      - 'null'
    minimum: 1
    maximum: 3650
    description: |-
      Validity in days for top-ups and membership-tier gifts from credit processing time. Credits never shorten
      an existing positive wallet's validity: keep the later expiry, and keep an existing no-expiry wallet unlimited.
      Null validity removes a finite expiry. Empty or expired wallets use the configured validity for the new credit.
  custom_top_up_amounts:
    oneOf:
      - type: 'null'
      - $ref: ./StoredValueCustomTopUpAmounts.yaml
  preset_top_up_amounts:
    type: array
    maxItems: 50
    description: The preset/preconfigured top-up amounts to suggest to the customer.
    items:
      $ref: ./PositiveMoney.yaml
  top_up_bonuses:
    type: array
    maxItems: 50
    description: The top-up bonuses that should be offered to the customer.
    items:
      $ref: ./StoredValueTopUpBonus.yaml
