Skip to content
← Public packages

@kentcdodds/stripe

Stripe helpers for customers, payments, invoices, subscriptions, products, payment links, refunds, and balance.

src/invoices-default.ts

17 lines · 740 B · TypeScript
import invoices from './invoices.ts'

/**
 * Stripe invoices dispatcher (default `./invoices` action). Defaults to list-invoices.
 * Use when routing invoice helpers; named helpers remain on the `invoices` namespace.
 *
 * @param input.action - list-invoices (default), get-invoice, search-invoices, create-invoice, finalize-invoice, send-invoice, void-invoice, delete-draft-invoice
 * @returns Action result for the selected Stripe helper
 *
 * @example
 * import invoices from 'kody:@kentcdodds/stripe/invoices'
 * const result = await invoices({ customerId: 'cus_123' })
 * // => { hasMore: false, invoices: [...] }
 */
export default async function invoicesDefault(input: Record<string, unknown> = {}) {
	return await invoices(input)
}