API Reference — Prepaid Wallets
API Reference — Prepaid Wallets
Check prepaid balances and top up credits programmatically. Endpoints live on the Control Plane API at https://cp-api.withpaygent.com and authenticate with your paygent-api-key header.
Prerequisites
customer_id is the customer’s external ID. The customer must already have a prepaid wallet for the credit currency. Create wallets in the dashboard or via an order with platform-fee credit benefits. See Credits & Wallets.
Authentication
API key in header only
Pass paygent-api-key as an HTTP header, not as a query parameter.
Get prepaid balance
GET /api/v1/wallet/balance returns all wallets for a customer. For prepaid wallets, use available, pending, and overage fields.
Example response (prepaid)
For prepaid, check available before allowing usage. Ignore postpaid_used / postpaid_limit (they stay 0 on prepaid wallets).
Prepaid response fields
Top up prepaid wallet
POST /api/v1/wallet/top-up adds credits to a prepaid wallet. Overage is cleared first; the remainder goes to available.
Example response
Prepaid integration flow
GET /api/v1/wallet/balance— checkavailable(and overage if enabled).- If sufficient balance, perform the LLM / API work.
POST /api/v2/usage— report usage; credits are debited from prepaid balance.
Postpaid wallets: Postpaid Wallets API
