Wallets & Credits
Create Wallet
Create a prepaid or postpaid wallet for a customer to manage credits and usage-based billing.
POST
Documentation Index
Fetch the complete documentation index at: https://mintlify.com/flexprice/flexprice/llms.txt
Use this file to discover all available pages before exploring further.
Request Body
The ID of the customer this wallet belongs to. Either
customer_id or external_customer_id is required.The external customer ID from your system. Either
customer_id or external_customer_id is required.Three-letter ISO currency code (e.g., USD, EUR, GBP)
Type of walletValues:
PREPAID: Customer must load credits before usagePOSTPAID: Customer can use credits and pay later
Conversion rate from wallet credits to currency during consumptionExamples:
1: 1 credit = 1 USD2: 1 credit = 0.5 USD (2 credits per dollar)0.5: 1 credit = 2 USD (0.5 credits per dollar)
Conversion rate for top-ups to the currency. If not provided, uses
conversion_rate.Examples:1: 1 USD = 1 credit2: 1 USD = 0.5 credits0.5: 1 USD = 2 credits
Number of credits to load into the wallet upon creation (not currency amount)
Expiry date for initial credits in ISO 8601 format (e.g., 2025-12-31T23:59:59Z)If not set, credits don’t expire.
Optional description for the wallet
Custom metadata as key-value pairs
Alert configuration for low balance notifications
Auto top-up configuration
Price unit code to use for wallet creation. If provided, overrides
currency and conversion_rate with values from the price unit.Response
Unique identifier for the wallet
ID of the customer this wallet belongs to
Auto-generated wallet name (e.g., “Prepaid Wallet - USD”)
Three-letter ISO currency code
Type of wallet (PREPAID or POSTPAID)
Current status of the walletValues:
ACTIVE, INACTIVE, SUSPENDEDCurrent balance in currency
Current balance in credits
Conversion rate from credits to currency
Conversion rate for top-ups
Alert configuration
Current alert stateValues:
OK, WARNING, CRITICALAuto top-up configuration
Custom metadata
Timestamp when wallet was created
Timestamp when wallet was last updated
Wallet Types Explained
Prepaid Wallet
Prepaid Wallet
A prepaid wallet requires customers to load credits before using your service.Use cases:
- Pay-as-you-go models
- Promotional credits
- Preventing overages
- Prepaid customer segments
- Usage is blocked when balance reaches zero
- Credits must be added before additional usage
- Suitable for usage-based pricing only
Postpaid Wallet
Postpaid Wallet
A postpaid wallet allows customers to use services and pay later through invoicing.Use cases:
- Enterprise customers
- Net payment terms
- Monthly invoicing cycles
- Customers with credit arrangements
- Balance can go negative
- Usage tracked and invoiced periodically
- Supports all price types (fixed, usage, tiered, etc.)