Skip to main content
Read-side access to who you bill and what they owe. List methods return a PagePromise you can await for one page or for await to auto-paginate.
Credits are first-class: every customer can hold one or more credit wallets alongside their dollar balances. listCreditAccounts returns them.

unitpay.customers.get

Fetch one customer by ID. Returns Promise<Customer> (id, email, name, status, type, salesMotion, address fields, metadata, …).

unitpay.customers.list

List customers. Takes optional query params (Record<string, unknown>); returns PagePromise<Customer>.

unitpay.customers.listInvoices

Invoices for a customer. Returns PagePromise<Invoice> (totalAmount, amountDue, amountPaid, currency, status, dueDate, paidAt, …).

unitpay.customers.listPaymentMethods

Payment methods on file. Returns PagePromise<PaymentMethod> (type, status, isDefault, and card: { brand, last4, expMonth, expYear }).

unitpay.customers.listCreditAccounts

The customer’s credit wallets. Returns PagePromise<CreditAccount> — one per credit currency, with balance, available, reserved, and currencyId.

unitpay.subscriptions.list

List subscriptions. Filter with query params{ customerId, status }. This is also how you list one customer’s subscriptions (there’s no customer-nested route). Returns PagePromise<Subscription> (planId, status, billingInterval, collectionMethod, currentBillingPeriodEnd, …).

unitpay.subscriptions.cancel

Cancel a subscription by ID. Optional params (Record<string, unknown>) controls cancellation behavior (e.g. immediate vs. at period end). Returns Promise<Subscription>.

unitpay.subscriptions.uncancel

Reverse a pending cancellation before it takes effect. Returns Promise<Subscription>.

See also

Usage & ingestion

Track billable events.

Portal sessions

Mint the token for customer-facing UI.