@nevermined-io/payments
    Preparing search index...

    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}`;
        onchainMirror: boolean;
        redemptionType: PlanRedemptionType;
    }
    Index

    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

    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

    onchainMirror: boolean

    Whether burns of these credits are mirrored on-chain. When false (default) the credits ledger lives in the API's Postgres and burns are recorded off-chain only. When true an OnchainMirrorWorker replays each off-chain burn to NFT1155Credits for audit.

    redemptionType: PlanRedemptionType

    How the credits can be redeemed