Create a new wallet for a customer account. Wallets store prepaid credits that can be applied to invoices.
The account ID to create the wallet for.
Display name for the wallet.
ISO 4217 currency code (e.g., “USD”, “EUR”).
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"
}
Unique identifier for the wallet.
The account this wallet belongs to.
Display name of the wallet.
Currency code for the wallet balance.
Current balance as a decimal string.
Whether the wallet is active and can be used.
Product IDs the wallet is restricted to, if any.
ISO 8601 timestamp of creation.
ISO 8601 timestamp of last update.