Defines types for pricing and routing payment commissions to eligible providers.
// Source: https://github.com/czaydev/better-payment | License: MIT | Copyright 2025-2026 Furkan Özay
// Provided via justclaw.it.com; keep this notice with the code.
// Public types of the commission router: the quote API, the policies and the
// injection points. Rate-table types live in `rates.ts`.
import type { PaymentErrorCode } from 'better-payment';
import type { BinLookup, CommissionRate } from './rates';
import type { RoutingStore } from './store';
/** The only routing strategy: cheapest eligible provider first */
export type RouterStrategy = 'lowest-cost';
/** Operations that create a charge and can therefore be routed by cost */
export type RouterOperation =
'createPayment' | 'authorize' | 'initThreeDSPayment' | 'initThreeDSAuthorize';
/** What the router is asked to price
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key