Interface PlanCreditsConfig

Definition of the credits configuration for a payment plan

interface PlanCreditsConfig {
    amount: bigint;
    creditsType: PlanCreditsType;
    durationSecs: bigint;
    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

creditsType: PlanCreditsType

The type of configuration of the credits type

durationSecs: bigint

The duration of the credits in seconds

Remarks

only if creditsType == EXPIRABLE

maxAmount: bigint

The maximum number of credits redeemed when using the plan

Remarks

only if creditsType == DYNAMIC

minAmount: bigint

The minimum number of credits redeemed when using the plan

Remarks

only if creditsType == FIXED or DYNAMIC

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