Skip to main content

Documentation Index

Fetch the complete documentation index at: https://ansdevcloud.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Credits & Ledger

Ansdev tracks every wallet movement in an append-only Transaction Ledger. Your visible balance is always SUM(amount) of your ledger entries — there is no separate balance column to fall out of sync.

Ledger entries

FieldNotes
transactionTypeDEPOSIT, ALLOCATE, CONSUME, REFUND
bucketTypeMASTER, CLOUD, AI, CREATIVE
amountPositive = credit, negative = debit. Float (smallest unit: 0.01).
statusPENDING (escrow), COMPLETED, FAILED
referenceIdRazorpay/Stripe payment ref, or internal task ID
lockedUntilEscrow expiry (null for non-pending entries)

Escrow model

When you start a video upload, the billing engine locks the quoted credits as a PENDING ledger entry against your CREATIVE bucket. The job lifecycle then:
PENDING (escrow lock)

  ├─▶ COMPLETED  (settle: credits actually spent)

  └─▶ FAILED   ─▶ REFUND  (new ledger entry, returns the locked credits)
You can’t allocate locked credits a second time — the API rejects the request at the billing-engine layer.

Reading your ledger

From the dashboard: Transaction Ledger (/dashboard/ledger). The same data is available via the internal GET /billing/ledger?limit=&offset= endpoint, which the dashboard uses. A public read endpoint for the ledger is on the roadmap (scope: billing:read).

Refunds

Triggered from the dashboard’s Trust & Refund Portal. Eligibility:
  • Registered less than 48 hours ago, and
  • Used less than 10 % of your wallet credits.
On a successful refund:
  1. Your files are deleted, your sessions revoked.
  2. A SHA-256 of your email is added to the RestrictedIdentity table so re-registration is detectable.
  3. Razorpay / Stripe is asked to refund the gateway side.
You can rejoin later (canRejoin: true), but you forfeit refund eligibility on future spend (refundEligible: false, permanent).