POST
/
wallets
curl --request POST \
  --url https://api.cloud.flexprice.io/v1/wallets \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "auto_topup_amount": 123,
  "auto_topup_min_balance": 123,
  "auto_topup_trigger": "disabled",
  "config": {
    "allowed_price_types": [
      "ALL"
    ]
  },
  "conversion_rate": 123,
  "currency": "<string>",
  "customer_id": "<string>",
  "description": "<string>",
  "initial_credits_to_load": 123,
  "initial_credits_to_load_expiry_date": 123,
  "metadata": {},
  "name": "<string>",
  "wallet_type": "PROMOTIONAL"
}'
{
  "auto_topup_amount": 123,
  "auto_topup_min_balance": 123,
  "auto_topup_trigger": "disabled",
  "balance": 123,
  "config": {
    "allowed_price_types": [
      "ALL"
    ]
  },
  "conversion_rate": 123,
  "created_at": "<string>",
  "credit_balance": 123,
  "currency": "<string>",
  "customer_id": "<string>",
  "description": "<string>",
  "id": "<string>",
  "metadata": {},
  "name": "<string>",
  "updated_at": "<string>",
  "wallet_status": "active",
  "wallet_type": "PROMOTIONAL"
}

Authorizations

x-api-key
string
header
required

Enter your API key in the format x-api-key <api-key>*

Body

application/json
Create wallet request
currency
string
required
customer_id
string
required
auto_topup_amount
number
auto_topup_min_balance
number
auto_topup_trigger
enum<string>
Available options:
disabled,
balance_below_threshold
config
object
conversion_rate
number

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

description
string
initial_credits_to_load
number

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_date
integer

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

metadata
object
name
string
wallet_type
enum<string>
Available options:
PROMOTIONAL,
PRE_PAID

Response

200
application/json
OK
auto_topup_amount
number
auto_topup_min_balance
number
auto_topup_trigger
enum<string>
Available options:
disabled,
balance_below_threshold
balance
number
config
object
conversion_rate
number
created_at
string
credit_balance
number
currency
string
customer_id
string
description
string
id
string
metadata
object
name
string
updated_at
string
wallet_status
enum<string>
Available options:
active,
frozen,
closed
wallet_type
enum<string>
Available options:
PROMOTIONAL,
PRE_PAID