Enum Class BackingStrategy
- All Implemented Interfaces:
Serializable,Comparable<BackingStrategy>,Constable
The backing strategy determines how many sats back a voucher and whether it can be split peer-to-peer. The merchant chooses the strategy at issuance based on the voucher's use case.
Strategy Comparison
| Strategy | Token Amount | Splittable | Use Case |
|---|---|---|---|
| FIXED | Constant (e.g., 1 sat) | No | Tickets, passes |
| MINIMAL | Constant (e.g., 10 sats) | Yes (coarse) | Gift cards |
| PROPORTIONAL | Scaled to face value | Yes (fine) | Split payments |
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFixed minimal sat backing for non-splittable vouchers.Low constant sat backing for occasional splits.Proportional sat backing scaled to face value for precise splits. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if this strategy supports fine-grained splits.booleanReturns true if this strategy allows splitting.static BackingStrategyReturns the enum constant of this class with the specified name.static BackingStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FIXED
Fixed minimal sat backing for non-splittable vouchers.Use for tickets, event passes, and single-use vouchers that must be redeemed whole. The token amount is a configurable constant (default: 1 sat).
Splitting is disabled - attempting to split a FIXED voucher should fail.
-
MINIMAL
Low constant sat backing for occasional splits.Use for gift cards, loyalty points, and store credit where splits are occasional. The token amount is a configurable constant (default: 10 sats).
Splitting is possible but with coarse granularity (limited split points).
-
PROPORTIONAL
Proportional sat backing scaled to face value for precise splits.Use for splittable vouchers, shared payments, and group gifts where precise division is needed. Token amount scales with face value (default: 1 sat per minor unit, e.g., 1 sat per cent for EUR).
Splitting supports fine granularity (cent-level precision).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isSplittable
public boolean isSplittable()Returns true if this strategy allows splitting.- Returns:
- true for MINIMAL and PROPORTIONAL, false for FIXED
-
hasFineGrainedSplits
public boolean hasFineGrainedSplits()Returns true if this strategy supports fine-grained splits.- Returns:
- true only for PROPORTIONAL
-