Wallets and credit grants are separate systems. A wallet holds money the customer paid in; a credit grant is credit you allocate, consumed while invoices are priced. The overview compares them.
product_ids. Wallet ids are prefixed wlt_, wallet grant ids wgr_, customer ids cust_. See How Alguna Works.
Create a wallet
Via API
name, customer_id, and currency are required. product_ids is optional and, when set, restricts which invoice lines the wallet may pay for. See Create a wallet.
active is a boolean; an inactive wallet cannot pay invoices. A wallet is always created empty — add funds afterwards.
From the dashboard
- Open Customers → [Customer] → Profile.
- In the Wallets card, add a wallet.
- Name it, choose the currency, and optionally restrict it to products.
- Save.
Add and remove funds
POST /wallets/{id}/credit and POST /wallets/{id}/debit move money and write a ledger entry. amount, transaction_type, and reference_id are required; description is optional. The response is the updated wallet with its new current_balance. See Credit a wallet and Debit a wallet.
422.
Transaction types
Wallet grants
A wallet grant records an amount to be added to a wallet, optionally tied to the payment or invoice that funds it and to an expiry date. Grants are how a prepaid package is represented on a wallet. See Create a wallet grant.Grant status
Transitions are
pending → approved, pending → voided, pending → expired, and approved → expired; voided and expired are terminal. A grant funded by an invoice (invoice_id) is approved when that invoice is paid; a top-up recorded without a payment is approved immediately.
List grants
Check the balance
{ "balance": "750.00" }. The wallet itself also carries current_balance, so GET /wallets/{id} answers the same question alongside the rest of the wallet. GET /wallets?customer_id=…&active=true lists a customer’s wallets.
Paying invoices from a wallet
A wallet is offered as a payment method on an invoice when all of the following hold:- The wallet is
active. - The wallet currency matches the invoice currency — Alguna does not convert between them.
- At least one invoice line is for a product the wallet is allowed to pay for (or
product_idsis empty). - The wallet has not already been used on that invoice.
- The invoice is not itself the invoice that funds a wallet grant.
Update or deactivate a wallet
PATCH /wallets/{id} accepts name, currency, active, and product_ids. Deactivating a wallet takes it out of the payment methods offered on an invoice without touching its balance or history. See Update a wallet.
Delete a wallet
DELETE /wallets/{id} returns 204. A wallet with a non-zero balance cannot be deleted: debit it to zero first, or deactivate it instead. See Delete a wallet.
Multi-currency
A wallet holds one currency, so a customer who is invoiced in more than one needs a wallet per currency. Invoices are paid from the wallet matching their currency. See Multi-Currency.Best practices
One wallet per currency
Wallets never convert. Create one for each currency the customer is invoiced in.
Always send a reference
Point
reference_id at the payment, invoice, or adjustment that caused the movement so the ledger reconciles.Scope with products
Use
product_ids when a prepaid balance should only pay for part of the catalogue.Deactivate before deleting
active: false stops new charges while keeping the balance and history.Next steps
Credits Overview
Wallets versus credit grants.
Credit Notes
Refund a credit note into a wallet.
Wallets API
Full request and response reference.