Documentation

    QBitFlow docs.

    Everything you need to integrate crypto payments — from your first checkout to going live.

    Allowances, max amount & pricing

    Understanding how allowances, max amounts, and pricing work in QBitFlow is essential for managing subscriptions effectively.

    What is an allowance?

    Authorized amount, not escrow

    An allowance is the amount a customer authorizes QBitFlow smart contracts to pull from their wallet for subscription billing. This is NOT an escrow — the customer keeps their funds in their wallet. They simply authorize the smart contract to pull up to this amount over time.

    How allowances work

    • When creating a subscription, the customer selects how many billing periods they want to authorize (e.g., 3 months, 6 months, 12 months).

    • The required allowance is calculated automatically: price × periods × (1 + buffer)

    • The customer signs one transaction to approve this allowance.

    • On each billing cycle, the smart contract automatically pulls the exact amount due.

    • The allowance decreases with each billing but funds remain in customer's wallet until billed.

    Allowance safety

    Allowances are safe and controlled

    The allowance cannot be pulled at once. Smart contracts enforce:
    • Billing frequency (can't bill more often than agreed)
    • Exact amount per billing cycle (can't exceed agreed price)
    • Customer can cancel anytime to stop future billings
    • All rules are enforced on-chain and verifiable

    Example allowance calculation

    Subscription price$99.99 USD/month
    Customer chooses6 months
    Selected currencyUSDC
    Required allowance~620 USDC

    * Includes buffer for price fluctuations

    MaxAmount & num periods explained

    Understanding these concepts is crucial for properly managing subscriptions and controlling costs.

    MaxAmount (all subscriptions)

    Definition: Used to handle price fluctuations in cryptocurrency values, ensuring individual payments don't exceed a reasonable threshold.

    For regular subscriptions

    • Set as a percentage of subscription price at creation time
    • Accommodates reasonable price changes in crypto markets
    • Can be updated later if needed

    Example

    For a $100/month subscription, MaxAmount might be set to 120 USDC (20% buffer). If the price of USDC drops and would require 130 USDC (equivalent to $100 at the time of payment), the transaction will be blocked until the user updates MaxAmount, protecting them from excessive charges.

    USDC is designed to be stable and closely match the USD value, so the amount of USDC needed for a $100 subscription should remain consistent. However, for other tokens/native currencies like ETH or SOL, prices can fluctuate significantly. MaxAmount acts as a safeguard to prevent unintended or unexpectedly large charges if the token price drops.

    Num periods (subscription creation)

    Definition: Used when creating subscriptions to automatically compute and set the allowance based on the subscription price and number of periods specified.

    Purpose

    • Streamlines subscription setup by pre-calculating allowance
    • Defines how many billing cycles the customer authorizes upfront
    • Reduces friction — users don't manually calculate required allowance

    How it works

    Allowance = Price × NumPeriods × (1 + Buffer)

    If subscription is $99.99/month and user selects 6 periods, the system automatically calculates the required allowance (≈ $620 with buffer) and prompts the user to approve it.

    Comparison: when to use what

    ConceptUsed forPurposeWho sets it
    MaxAmountAll subscriptionsHandle crypto price volatilitySystem (with buffer)
    Num periodsSubscription creationCalculate initial allowanceUser/customer

    Pricing in USD

    Stable pricing for merchants

    All product prices in QBitFlow are set in USD. When a customer pays, QBitFlow automatically converts the USD price to the customer's selected cryptocurrency at the current exchange rate. This gives you predictable revenue while customers can pay in their preferred crypto.

    How price conversion works

    1

    You set USD price

    Create a product with price: $99.99

    2

    Customer selects cryptocurrency

    Customer chooses to pay in ETH, USDC, SOL, etc.

    3

    Automatic conversion

    QBitFlow fetches the current exchange rate and calculates the equivalent amount in the selected crypto.

    4

    Customer pays

    Customer pays the converted amount in their chosen cryptocurrency.

    Key takeaway

    Allowances keep funds in the customer's wallet while enabling automated billing. Max amounts protect customers from price volatility. USD pricing gives you predictable revenue. These three features work together to create a secure, user-friendly subscription experience.
    Talk to us