Skip to main content
POST
https://api.alguna.io
/
wallets
curl -X POST https://api.alguna.io/wallets \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "acc_abc123",
    "name": "Prepaid Credits",
    "currency": "USD",
    "productIds": ["prod_xyz789"]
  }'
{
  "id": "wal_def456",
  "accountId": "acc_abc123",
  "name": "Prepaid Credits",
  "currency": "USD",
  "currentBalance": "0.00",
  "active": true,
  "productIds": ["prod_xyz789"],
  "createdAt": "2024-01-20T10:00:00Z",
  "updatedAt": "2024-01-20T10:00:00Z"
}
Create a new wallet for a customer account. Wallets store prepaid credits that can be applied to invoices.
accountId
string
required
The account ID to create the wallet for.
name
string
required
Display name for the wallet.
currency
string
required
ISO 4217 currency code (e.g., “USD”, “EUR”).
productIds
array
Optional array of product IDs. If specified, wallet credits can only be applied to these products.
curl -X POST https://api.alguna.io/wallets \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "acc_abc123",
    "name": "Prepaid Credits",
    "currency": "USD",
    "productIds": ["prod_xyz789"]
  }'
{
  "id": "wal_def456",
  "accountId": "acc_abc123",
  "name": "Prepaid Credits",
  "currency": "USD",
  "currentBalance": "0.00",
  "active": true,
  "productIds": ["prod_xyz789"],
  "createdAt": "2024-01-20T10:00:00Z",
  "updatedAt": "2024-01-20T10:00:00Z"
}
id
string
Unique identifier for the wallet.
accountId
string
The account this wallet belongs to.
name
string
Display name of the wallet.
currency
string
Currency code for the wallet balance.
currentBalance
string
Current balance as a decimal string.
active
boolean
Whether the wallet is active and can be used.
productIds
array
Product IDs the wallet is restricted to, if any.
createdAt
string
ISO 8601 timestamp of creation.
updatedAt
string
ISO 8601 timestamp of last update.