Skip to main content

Overview

Percify uses a unified credit model to keep pricing transparent and enable future tier overrides without rewriting feature logic. All generation actions debit credits atomically after success.

Feature Costs

Centralized Logic (credit-costs.ts)

Exports:
  • DEFAULT_COSTS – baseline values
  • TIER_COSTS – placeholder map for future tier overrides
  • getFeatureCost(feature) – simple lookup
  • calculateVideoCost(duration, feature) – base + perSecond dynamic
  • calculateAudioCost(duration) – base + perSecond

Example Usage

Debit Flow

  1. User initiates generation
  2. System validates sufficient balance
  3. Job runs (async or inline)
  4. On success → debit transaction committed
  5. On failure → no debit (idempotent)

UI Display

Use getAllCosts() to present current pricing table; dynamic adjustments possible once tier overrides implemented.

Future Tier Pricing (Planned)

Rationale

Troubleshooting

  • [/percify/payments]
  • [/percify/image-to-video]
  • [/percify/voice-cloning]

Continue to payment flows at [/percify/payments].