Credits & Wallets
Credits & Wallets
Paygent bills usage in custom credit currencies (e.g. cx, Credits). Each customer holds one wallet per currency. Usage against credit-priced indicators debits or accrues on that wallet at billing time.
Choose prepaid (pay before use) or postpaid (use now, invoice later). The setup path differs — read both sections before configuring.
Prepaid vs postpaid
One wallet per currency. You cannot mix prepaid and postpaid for the same customer + credit currency + organization. Choose the wallet type when creating it — before the first invoice.
Prepaid wallets
Customer pays before usage. Credits load into available_balance via platform-fee benefits, manual top-up, or order invoice payment.
Where credits come from
- On the agent/plan Platform fee, enable Credits / Entitlement
- Choose the credit currency and credits per billing period (e.g. 1,000/month)
- Set indicator pricing to CREDITS with the same currency and credits per indicator
- Create an Order — configure wallet settings (rollover, overage) on the Lines step
- Invoice runs → credits post as pending → Mark as paid → credits become available
Platform fee = credit load. Indicator = usage cost. Platform fee credit benefits define how many credits the customer receives. Indicator credits per signal defines how many each usage event costs.
Create a prepaid wallet
Option A — via order (recommended)
Wallet auto-creates on first invoice when platform fee credit benefits exist. Configure rollover/overage on the order’s wallet settings step.
Option B — manual (dashboard)
- Customers → [customer] → Wallet → Create Wallet
- Choose Prepaid wallet
- Add credit currency, initial balance, conversion rate, rollover, and overage settings
- Optionally enable Record as payment to log USD value
Prepaid balance fields
On each usage event, credits debit from available (or overage if enabled). Blocked when balance + overage are exhausted.
Postpaid wallets
Customer uses the service first, pays at period end. No upfront credit load. Usage accrues in postpaid_used and is invoiced in USD using the wallet conversion rate.
How pricing works
Postpaid does not use platform-fee credit benefits. Price usage on the activity indicator:
- Agents → Activity based → open indicator
- Set billing type to CREDITS
- Choose the credit currency (from Credit Currencies)
- Set credits per indicator — cost per usage event
Each usage event accrues that amount on the customer’s postpaid wallet.
Create a postpaid wallet
Postpaid wallets are created in the dashboard only (not via order auto-creation or public API):
- Customers → [customer] → Wallet → Create Wallet
- Choose Postpaid wallet
- Add the same credit currency used on the indicator
- Optionally set credit limit (0 = unlimited)
- Create an Order for billing period / invoicing
If the order’s platform fee also lists a credit benefit for the same currency, invoice cron may auto-create a prepaid wallet first. For postpaid-only setups, create the postpaid wallet manually before the first invoice, and avoid platform-fee credits on that currency.
Postpaid balance fields
available_balance stays 0 on postpaid — always check postpaid_used before allowing more usage.
At invoice time: postpaid_used × conversion_rate → USD line item. Balance resets for the next period.
Credit-priced indicators
On an agent or plan, set an indicator’s billing type to CREDITS:
- Credit currency — which wallet to debit (must match an existing wallet)
- Credits per indicator — cost per event (or
metered_quantity × creditsPerSignalwith a billable metric)
Wallet transaction types
When usage debits a wallet
During billing, if the customer has an active wallet for the indicator’s credit currency:
- Prepaid: If
available_balance ≥ credits_required, debit prepaid. If insufficient andoverage_allowed, use prepaid first then overage up tooverage_limit. - Postpaid: Accrue credits on
postpaid_used; convert to USD on invoice. - No wallet: Billing continues on the normal revenue path without wallet debit.
Public Wallet API
Integrations can read balances and top up prepaid wallets via the Control Plane API. Wallet creation is managed through the dashboard or order/invoice flows — not via the public API.
Related guides
- Credit Currencies — define currencies before wallets
- Orders & Invoicing — activate billing for credit benefits
- Plans — bundle credits in plan platform fees
