Definition of the price configuration for a Payment Plan

interface PlanPriceConfig {
    amounts: bigint[];
    contractAddress?: `0x${string}`;
    feeController?: `0x${string}`;
    priceType: PlanPriceType;
    receivers: string[];
    tokenAddress?: `0x${string}`;
}

Properties

amounts: bigint[]

The amounts to be paid for the plan

Remarks

only if priceType == FIXED_PRICE or FIXED_FIAT_PRICE

contractAddress?: `0x${string}`

The address of the smart contract that calculates the price

Remarks

only if priceType == SMART_CONTRACT_PRICE

feeController?: `0x${string}`

The address of the fee controller contract, if any

Remarks

if not given, the fee controller is the default one

priceType: PlanPriceType

The type or configuration of the price

Remarks

0 - crypto fixed price. 1 - fixed fiat price. 2 - smart contract price

receivers: string[]

The receivers of the payments of the plan

Remarks

only if priceType == FIXED_PRICE

tokenAddress?: `0x${string}`

The address of the token (ERC20 or Native if zero address) for paying the plan

Remarks

only if priceType == FIXED_PRICE or SMART_CONTRACT_PRICE