Interface PlanCreditsConfig

Definition of the credits configuration for a payment plan

interface PlanCreditsConfig {
    amount: bigint;
    durationSecs: bigint;
    isRedemptionAmountFixed: boolean;
    maxAmount: bigint;
    minAmount: bigint;
    nftAddress?: `0x${string}`;
    proofRequired: boolean;
    redemptionType: PlanRedemptionType;
}

Properties

amount: bigint

The amount of credits that are granted when purchasing the plan (as string for API)

durationSecs: bigint

The duration of the credits in seconds

Remarks

0 means non-expirable

isRedemptionAmountFixed: boolean

Whether the redemption amount is fixed (true) or dynamic (false)

maxAmount: bigint

The maximum number of credits redeemed when using the plan

minAmount: bigint

The minimum number of credits redeemed when using the plan

nftAddress?: `0x${string}`

The address of the NFT contract that represents the plan's credits

proofRequired: boolean

Whether the credits burn proof signed by the user is required

redemptionType: PlanRedemptionType

How the credits can be redeemed