Customer wallets
Attribute payments and accounting entries to individual customers without delaying card processing.
Use test payment details only. No real money moves; live activation is separate.
Customer wallets are an internal breakdown of your business's existing payment ledger. They do not open bank accounts, initiate transfers or enable customer withdrawals. Sandbox and production data are separate, and each currency has its own wallet.
Attach a customer to a payment
Add customer to POST /v1/payments, using the customer’s name and email:
{
"amount": 500,
"currency": "USD",
"reference": "order-0001",
"customer": {
"name": "Example Customer",
"email": "customer@example.com"
},
"success_url": "https://merchant.example/payments/success",
"cancel_url": "https://merchant.example/payments/cancel"
}This example uses hosted checkout. Approved raw-card integrations add their normal payment_method object to the same request. Token confirmation and authentication are unchanged.
Both customer.name and customer.email are required when customer is supplied. Do not send customer.id; it is rejected. No separate customer-registration request is needed. You may omit customer entirely for an unattributed payment.
We find or create the customer using your organization, environment and email, with a separate wallet per currency. API-key rotation does not change identity. Matching ignores email casing and surrounding whitespace, but preserves dots and + aliases. Names are descriptive and do not affect matching. The first processed profile is retained; later payment snapshots do not overwrite it.
Send a consistent, accurate customer email. Shared email addresses share a customer identity; a changed email normally produces a separate identity. We do not infer identity from names or cards. One matching historical customer can be reused. If several historical customers share the email, their histories stay separate and the new attribution remains pending for operations review. Never resubmit a payment to resolve a matching issue.
Recurring renewals inherit the source payment’s attribution. Historical payments without customer details remain unattributed.
The customer fields are part of payment idempotency. Keep the same request and Idempotency-Key when retrying. Changing the normalized name or email, or removing the customer under an existing key, returns a conflict. Email casing and surrounding whitespace alone do not change its identity or retry fingerprint. A different payment for the same customer uses a new payment idempotency key.
Asynchronous wallet creation
Payment creation records the name/email snapshot and durable assignment work in the same database transaction. It does not wait for a customer lookup or wallet creation. Existing queue consumers and scheduled recovery create the customer and wallet, then attach the payment exactly once.
Use the payment id to correlate responses, events and wallet entries. New email-based payments do not include a customer ID in payment responses or events because attribution runs asynchronously. Historical ID-based payments can still include their original customer_id. Names, emails and card details are not added to event payloads. A successful HTTP response is not proof of payment: continue using payment status and signed events to determine capture.
After capture, the existing double-entry journal supplies the wallet's top-up. Refunds, processing fees, disputes and cleared-funds entries stay linked to the original payment. There is no second balance or second copy of the money. If assignment is delayed, the payment can still succeed; all existing journals become visible when assignment recovers.
Find a wallet
Use a server API key with finance:read:
GET /v1/wallets?email=customer%40example.com¤cy=USD
Authorization: Bearer YOUR_ENVIRONMENT_API_KEYURL-encode the email, especially + as %2B and @ as %40. The response contains data, next_cursor and pending_assignments. Each returned wallet has a read-only customer_id: generated for new customers, with original references preserved for historical customers. Clients do not need to save or resend it for payments. The optional customer_id wallet-list filter is read-only. If no wallet appears yet and pending_assignments is positive, retry the read after a short delay. Do not resubmit the payment to create a wallet.
Read the wallet using its returned UUID:
GET /v1/wallets/WALLET_ID
GET /v1/wallets/WALLET_ID/entries?limit=50Both list endpoints support limit from 1 to 100 and an opaque cursor from the preceding page's next_cursor. Refresh the first page after pending assignments finish; historical entries can appear following recovery. API keys cannot access another business's wallets.
Balances and ledger entries
All balance amounts are signed strings in minor units, so "500" means USD 5.00 for a USD wallet.
| Field | Meaning |
|---|---|
gross_topups | Total captured principal, before fees, refunds and disputes. |
pending | Net accounting amount awaiting clearance, including unresolved debit adjustments. |
cleared | Net amount moved into the cleared accounting balance. |
balance | Pending plus cleared. Can be negative after adjustments. |
refund_holds | Pending refund reservations. |
available | Nonnegative cleared amount after pending debt and refund holds; zero while the wallet has reconciliation exceptions or pending assignments, or the business has unallocated remittances in this currency. |
settlement_deductions | Monthly remittances explicitly attributed to this wallet. |
unallocated_remittances | Business-level recorded remittances in this currency awaiting wallet attribution. This is a reconciliation flag, not an additional wallet debit. |
available is an internal accounting amount, not proof that funds reached a bank account or authorization to withdraw. withdrawals_enabled is always false. Existing pricing still applies: processing costs are separate entries, and the agreed 0.3% platform fee remains manually collected after bank receipt.
Entries carry payment_id, journal_id, kind, pending_delta, cleared_delta and their net amount. Capture credits pending; release moves pending to cleared without increasing the net amount. Refunds, reversals and disputes append new journal entries. A recorded monthly remittance can be allocated by an authenticated operator using retained evidence; allocation never sends money or charges the ledger twice.