v52

latestOpenAPI 3.0.1AGPL-3.0raw.githubusercontent.com2026-08-01255473862.7 KB
Wallets

Create a new wallet

Use when giving a customer a prepaid or credit balance (e.g. prepaid plans or promotional credits).

post/wallets

Request body

conversion_ratestring

amount in the currency = number of credits * conversion_rate ex if conversion_rate is 1, then 1 USD = 1 credit ex if conversion_rate is 2, then 1 USD = 0.5 credits ex if conversion_rate is 0.5, then 1 USD = 2 credits

currencystring required
customer_idstring
descriptionstring
external_customer_idstring

external_customer_id is the customer id in the external system

initial_credits_expiry_date_utcstring

initial_credits_expiry_date_utc is the expiry date in UTC timezone (optional to set nil means no expiry) ex 2025-01-01 00:00:00 UTC

initial_credits_to_loadstring

initial_credits_to_load is the number of credits to load to the wallet if not provided, the wallet will be created with 0 balance NOTE: this is not the amount in the currency, but the number of credits

initial_credits_to_load_expiry_dateinteger

initial_credits_to_load_expiry_date YYYYMMDD format in UTC timezone (optional to set nil means no expiry) for ex 20250101 means the credits will expire on 2025-01-01 00:00:00 UTC hence they will be available for use until 2024-12-31 23:59:59 UTC

metadataTypesMetadata
price_unitstring

price_unit is the code of the price unit to use for wallet creation If provided, the price unit will be used to set the currency and conversion rate of the wallet:

  • currency: set to price unit's base_currency
  • conversion_rate: set to price unit's conversion_rate
topup_conversion_ratestring

topup_conversion_rate is the conversion rate for the topup to the currency ex if topup_conversion_rate is 1, then 1 USD = 1 credit ex if topup_conversion_rate is 2, then 1 USD = 0.5 credits ex if topup_conversion_rate is 0.5, then 1 USD = 2 credits

wallet_type'PRE_PAID' | 'POST_PAID'

Response

OK

alert_state'ok' | 'info' | 'warning' | 'in_alarm'
balancestring
conversion_ratestring

amount in the currency = number of credits * conversion_rate ex if conversion_rate is 1, then 1 USD = 1 credit ex if conversion_rate is 2, then 1 USD = 0.5 credits ex if conversion_rate is 0.5, then 1 USD = 2 credits

created_atstring date-time
created_bystring
credit_balancestring
currencystring
customer_idstring
descriptionstring
environment_idstring
idstring
metadataTypesMetadata
namestring
real_time_balancestring
real_time_credit_balancestring
status'published' | 'deleted' | 'archived'
tenant_idstring
topup_conversion_ratestring

topup_conversion_rate is the conversion rate for the topup to the currency ex if topup_conversion_rate is 1, then 1 USD = 1 credit ex if topup_conversion_rate is 2, then 1 USD = 0.5 credits ex if topup_conversion_rate is 0.5, then 1 USD = 2 credits

updated_atstring date-time
updated_bystring
wallet_status'active' | 'frozen' | 'closed'
wallet_type'PRE_PAID' | 'POST_PAID'