Skip to main content

Get Customer Wallets

Get a customer’s balance in each currency.

Create Ledger Entry

Add funds to or deduct funds from a wallet.

List Ledger Entries

Page through every wallet transaction.

What Are Customer Wallets?

A customer wallet holds real money for a customer, with one balance per currency. Use wallets to:
  • Store prepaid funds for future subscription payments
  • Handle refunds as wallet balance instead of a refund to the card
  • Issue promotional balances, such as welcome bonuses or loyalty rewards
  • Apply wallet funds to subscription charges automatically at billing time
  • Track every transaction in a ledger with the balance before and after
You don’t create wallets yourself. A customer’s wallet for a currency is created, with a zero balance, the first time you add a ledger entry in that currency. Until then, Get Customer Wallets returns no entry for that currency.
Customer Wallets ≠ Credit-Based BillingCustomer Wallets hold real money that Dodo Payments applies to subscription charges.To track virtual usage units such as API calls, tokens, or compute hours, use Credit-Based Billing instead.
Customer Wallets

How It Works

When a subscription renews or a plan change creates a charge, Dodo Payments first applies the customer’s wallet balance in that currency, then charges the payment method for the rest. If the balance covers only part of the charge, the wallet pays that part.

Automatic Setup

You don’t need to set anything up. Add a ledger entry through the API, or click Apply Credit/Debit on the customer’s Wallets tab in the dashboard, and the wallet for that currency is ready to use.

Multi-Currency Support

Each currency has its own balance. Each wallet in the Get Customer Wallets response has a currency and a balance in the smallest currency unit, and the response adds total_balance_usd, the sum of all balances converted to USD. Ledger entries accept these currencies:
integer
Balance in US Dollars (stored in cents)
integer
Balance in Euros (stored in cents)
integer
Balance in Pounds Sterling (stored in pence)
Customer wallets hold USD, EUR, and GBP balances. The discontinued INR native wallet described in Payout Structure is your merchant payout wallet, not a customer wallet. INR also remains supported as a transaction currency for UPI, RuPay, and Indian-card subscriptions.

Working with Wallets

Check Customer Balances

Get a customer’s balance in every currency, for example to confirm the balance before a purchase or to show it in your app.

Get Customer Wallet Balances

Get a customer’s wallet balances in all currencies.

Add or Deduct Funds

Add funds, such as a welcome bonus or a refund balance, or deduct funds, such as a manual charge. entry_type, currency, and amount are required. amount is a positive integer in the smallest currency unit. Add a reason (up to 500 characters) for your audit trail, and an idempotency_key to prevent duplicates. The response is the updated wallet.
entry_type is 'credit' to add funds to the wallet and 'debit' to subtract funds from it. A debit larger than the balance fails with 400.

Create Customer Wallet Ledger Entry

Add funds to or deduct funds from a customer’s wallet.

View Transaction History

List every credit and debit for a customer, with pagination and an optional currency filter. Each entry has an event_type (payment, payment_reversal, refund, refund_reversal, dispute, dispute_reversal, or merchant_adjustment), the amount, and the before_balance and after_balance. Use the ledger to reconcile accounts and to answer customer questions.

List Customer Wallet Ledger Entries

List every wallet transaction for a customer.

Real-World Examples

The examples use the TypeScript SDK. client is a DodoPayments client, created as in the Integration Guide.

Refund to Wallet

To refund a customer as wallet balance instead of back to their card, add the amount with a credit entry. The funds stay with your business for the customer’s next purchase.
A ledger credit doesn’t refund the original payment. When you refund a payment through the Refunds API, Dodo Payments returns any part of it that the wallet paid to the wallet automatically.

Welcome Bonus / Promotional Balance

Give new customers a welcome bonus to encourage their first purchase.

Subscription Payment from Wallet

Deduct funds from a wallet to pay for a charge you bill yourself. Renewals don’t need this step, because Dodo Payments applies the balance to them automatically.

Prepaid Billing System

Let customers fund their account up front and draw down that balance over time. customerId, paymentId, and purchaseId are your own identifiers for the customer, the deposit, and the purchase.
1

Add Initial Funds

Add funds to the customer’s wallet when they make a deposit.
2

Apply Balance to Purchases

Deduct from the balance as the customer uses your services.
3

Monitor Balances

Check whether a customer is running low on funds, and prompt a top-up.

Multi-Currency Support

Keep separate balances for customers in different regions.
Manage USD funds for US-based customers.
Manage EUR funds for Europe-based customers.
Manage GBP funds for UK-based customers.

Best Practices

Prevent Duplicate Transactions

Pass an idempotency_key derived from the event that caused the entry, such as an order or payment ID, so a retry can’t add or deduct the funds twice. If you repeat a request with the same key, Dodo Payments creates no new entry and returns the current wallet.

Check Balances Before Charging

Before you deduct a large amount from a wallet, confirm that the balance covers it.

What’s Coming Next

Customer wallets don’t support these features:
  • Balance Expiration: Wallet funds don’t expire.
  • Analytics: There are no spending reports or balance trends. Use the ledger to build your own.
  • Webhooks: No webhook fires when a balance changes, and there are no low-balance alerts. To track changes, list the ledger entries.
Start with basic funding and deduction, then automate more of your billing workflow as your business grows.
Last modified on September 26, 2026