/** * Configuration options for the OrcaRail client */ interface OrcaRailConfig { /** * Base URL for the OrcaRail API * @default "https://api.orcarail.com/api/v1" */ baseUrl?: string; /** * API version * @default "v1" */ apiVersion?: string; /** * Request timeout in milliseconds * @default 30000 */ timeout?: number; } /** * Base parameters for creating a Payment Intent */ interface PaymentIntentBaseParams { /** * Payment method types (must include "crypto") * @default ["crypto"] */ payment_method_types?: string[]; /** * Return URL after payment completion */ return_url: string; /** * Cancel URL if payment is canceled */ cancel_url?: string | null; /** * Payment description */ description?: string; /** * Custom metadata object */ metadata?: Record | null; /** * ISO 8601 expiration timestamp */ expires_at?: string | null; /** * Withdrawal addresses by chain type (e.g. { evm: '0x...', solana: '...' }). When omitted, user's default from Withdrawal Settings is used. */ withdrawal_addresses?: Record; } /** * Parameters for creating a Payment Intent. * Must provide either a `price_id` or the full amount/currency/token/network details. */ type PaymentIntentCreateParams = (PaymentIntentBaseParams & { /** Catalog price UUID. */ price_id: string; amount?: string; currency?: string; tokenId?: string; networkId?: string; }) | (PaymentIntentBaseParams & { price_id?: never; /** Amount to charge (e.g., "100.00") */ amount: string; /** Currency code (e.g., "usd") */ currency: string; /** Token ID (UUID, e.g., USDC, USDT) */ tokenId: string; /** Network ID (UUID, e.g., Ethereum, Polygon) */ networkId: string; }); /** * Parameters for updating a Payment Intent */ interface PaymentIntentUpdateParams { /** * Updated catalog price UUID */ price_id?: string; /** * Updated amount */ amount?: string; /** * Updated currency */ currency?: string; /** * Updated payment method types */ payment_method_types?: string[]; /** * Updated token ID (UUID) */ tokenId?: string; /** * Updated network ID (UUID) */ networkId?: string; /** * Updated return URL */ return_url?: string; /** * Updated cancel URL */ cancel_url?: string | null; /** * Updated description */ description?: string; /** * Updated metadata */ metadata?: Record | null; /** * Updated expiration timestamp */ expires_at?: string | null; /** * Withdrawal addresses by chain type (e.g. { evm: '0x...', solana: '...' }). When omitted, user's default from Withdrawal Settings is used. */ withdrawal_addresses?: Record; } /** * Parameters for confirming a Payment Intent */ interface PaymentIntentConfirmParams { /** * Client secret for the payment intent (from create/retrieve response) */ client_secret: string; /** * Return URL after payment completion */ return_url: string; } /** * Payment Link object */ interface PaymentLink { /** * Payment link ID (UUID) */ id: string; /** * Unique slug */ unique_slug?: string; /** * Payment link URL */ link: string; } /** * Payment transaction status values returned by the API. * Aligns with API PaymentStatusEnum. */ type PaymentStatus = 'pending' | 'partial_confirmed' | 'confirmed' | 'canceled' | 'expired' | 'completed' | 'withdrawn'; /** * Latest transaction details */ interface LatestTransaction { /** * Transaction ID */ id: string; /** * Transaction status (enum value from API) */ status: PaymentStatus; /** * Transaction hash */ hash?: string; /** * Transaction amount */ amount?: string; /** * Transaction address */ address?: string; } /** * Payment Intent object */ interface PaymentIntent { /** * Payment Intent ID (raw, no prefix) */ id: string; /** * Object type (always "payment_intent") */ object: string; /** * Amount to charge */ amount: string; /** * Currency code (from currency relation) */ currency: string; /** * Currency entity ID (from currency relation) */ currency_id?: string; /** * Current status (enum value from API) */ status: PaymentIntentStatus; /** * Payment method types */ payment_method_types: string[]; /** Catalog price UUID */ price_id?: string; /** Expanded catalog price context */ price?: CatalogPriceSummary | null; /** Expanded catalog product context */ product?: CatalogProductSummary | null; /** * Client secret used to confirm the payment intent from the frontend */ client_secret?: string; /** * Pay URL (clean URL without secrets) */ pay_url?: string; /** * Return URL */ return_url: string; /** * Cancel URL */ cancel_url?: string | null; /** * Payment description */ description?: string | null; /** * Custom metadata */ metadata?: Record | null; /** * Payment link object */ payment_link?: PaymentLink; /** * Expiration timestamp */ expiresAt?: string; /** * Latest transaction details (for completed intents) */ latestTransaction?: LatestTransaction; /** * Creation timestamp */ createdAt: string; /** * Last update timestamp */ updatedAt: string; } /** * Payment Intent status values returned by the API. * Aligns with API enum: requires_payment_method | requires_confirmation | processing | completed | canceled */ type PaymentIntentStatus = 'requires_payment_method' | 'requires_confirmation' | 'processing' | 'completed' | 'canceled'; type SubscriptionStatus = 'trialing' | 'active' | 'past_due' | 'canceled' | 'paused' | 'completed'; type SubscriptionInterval = 'day' | 'week' | 'month' | 'year'; interface CatalogListEnvelope { object: 'list'; url: string; has_more: boolean; data: T[]; } /** * Expanded price on subscription / payment intent API responses. */ interface ExpandedPriceSummary { object?: 'price'; id: string; unit_amount_decimal: string; currency?: string | { id: string; code: string; name?: string | null; symbol?: string | null; } | null; nickname?: string | null; active?: boolean; recurring?: { interval: SubscriptionInterval; interval_count: number; trial_period_days?: number | null; usage_type?: string; } | null; type?: 'one_time' | 'recurring'; product_id?: string; currency_id?: string; token_id?: string; network_id?: string; metadata?: Record | null; token?: { id: string; symbol: string; name: string; } | null; network?: { id: string; name: string; chain_id?: number | null; } | null; /** @deprecated Prefer unit_amount_decimal */ amount?: string; interval?: SubscriptionInterval | null; interval_count?: number | null; } /** @deprecated Use ExpandedPriceSummary */ type CatalogPriceSummary = ExpandedPriceSummary; interface ProductSummary { id: string; name: string; description?: string | null; active?: boolean; /** Present on public catalog price rows when product images are resolved. */ images?: string[]; metadata?: Record | null; } /** @deprecated Use ProductSummary */ type CatalogProductSummary = ProductSummary; interface CatalogProduct { object: 'product'; id: string; active: boolean; created: number; default_price: string | null; description?: string | null; images: string[]; image_file_ids?: string[]; marketing_features: { name: string; }[]; livemode: boolean; metadata: Record; name: string; shippable: boolean | null; statement_descriptor: string | null; unit_label: string | null; updated: number; url: string | null; } interface CatalogPriceRecurring { interval: SubscriptionInterval; interval_count: number; trial_period_days: number | null; usage_type: string; } interface CatalogPrice { object: 'price'; id: string; active: boolean; billing_scheme: string; created: number; currency: string | null; livemode: boolean; lookup_key: string | null; metadata: Record; nickname: string | null; product: string | ProductSummary; recurring: CatalogPriceRecurring | null; type: 'one_time' | 'recurring'; unit_amount_decimal: string; token?: { id: string; symbol: string; name: string; } | null; network?: { id: string; name: string; chain_id?: number | null; } | null; } interface ProductCreateParams { name: string; description?: string | null; active?: boolean; metadata?: Record; default_price?: string; image_file_ids?: string[]; marketing_features?: { name: string; }[]; statement_descriptor?: string | null; unit_label?: string | null; shippable?: boolean | null; url?: string | null; livemode?: boolean; } /** @deprecated Use ProductCreateParams */ type CatalogProductCreateParams = ProductCreateParams; interface ProductUpdateParams { name?: string; description?: string | null; active?: boolean; metadata?: Record | null; default_price?: string | null; image_file_ids?: string[] | null; marketing_features?: { name: string; }[] | null; statement_descriptor?: string | null; unit_label?: string | null; shippable?: boolean | null; url?: string | null; livemode?: boolean; } /** @deprecated Use ProductUpdateParams */ type CatalogProductUpdateParams = ProductUpdateParams; interface ProductDataInlineParams { name: string; active?: boolean; metadata?: Record; statement_descriptor?: string | null; unit_label?: string | null; } interface PriceCreateParams { product?: string; product_data?: ProductDataInlineParams; unit_amount_decimal: string; currency: string; token_id: string; network_id: string; recurring?: { interval: SubscriptionInterval; interval_count?: number; trial_period_days?: number; } | null; lookup_key?: string; transfer_lookup_key?: boolean; nickname?: string | null; active?: boolean; metadata?: Record; } /** @deprecated Use PriceCreateParams */ type CatalogPriceCreateParams = PriceCreateParams; interface PriceUpdateParams { product?: string; nickname?: string | null; unit_amount_decimal?: string; currency?: string; token_id?: string; network_id?: string; recurring?: { interval?: SubscriptionInterval | null; interval_count?: number | null; trial_period_days?: number | null; } | null; lookup_key?: string | null; transfer_lookup_key?: boolean; active?: boolean; metadata?: Record | null; } /** @deprecated Use PriceUpdateParams */ type CatalogPriceUpdateParams = PriceUpdateParams; interface PriceListParams { active?: boolean; recurring?: boolean; limit?: number; } /** @deprecated Use PriceListParams */ type CatalogPriceListParams = PriceListParams; type SubscriptionCollectionMethod = 'send_payment_link' | 'auto_charge'; interface SubscriptionAutoCharge { payer_wallet_address: string; payer_network_id: string; payer_token_id: string; allowance_tx_hash: string | null; approved_amount: string | null; status: 'pending' | 'approved' | 'revoked' | 'failed'; } interface Subscription { id: string; object: 'subscription'; status: SubscriptionStatus; collection_method: SubscriptionCollectionMethod; description: string; amount: string; currency: string; token: { id: string; symbol: string; name: string; }; network: { id: string; name: string; chain_id: number; }; price_id?: string | null; price?: CatalogPriceSummary | null; product?: CatalogProductSummary | null; interval: SubscriptionInterval; interval_count: number; total_cycles: number | null; completed_cycles: number; billing_cycle_anchor: number; current_period_start: string; current_period_end: string; start_date: string; ended_at: string | null; cancel_at: string | null; cancel_at_period_end: boolean; canceled_at: string | null; cancellation_details: { comment: string | null; feedback: string | null; reason: string | null; }; trial_start: string | null; trial_end: string | null; auto_charge: SubscriptionAutoCharge | null; payer: { id: string; email: string; } | null; latest_payment_link: PaymentLink | null; payment_links?: { object: 'list'; data: PaymentLink[]; has_more: boolean; }; withdrawal_addresses: Record; metadata: Record | null; return_url: string | null; cancel_url: string | null; created: string; updated: string; } interface SubscriptionBaseParams { description: string; collection_method?: SubscriptionCollectionMethod; total_cycles?: number; billing_cycle_anchor?: string; cancel_at?: string; cancel_at_period_end?: boolean; days_until_due?: number; trial_end?: string; trial_period_days?: number; payer_user_id?: string; payer_email?: string; withdrawal_addresses?: Record; metadata?: Record; return_url?: string; cancel_url?: string; } /** * Parameters for creating a Subscription. * Must provide either a `price_id` or the full amount/currency/token/network/interval details. */ type SubscriptionCreateParams = (SubscriptionBaseParams & { /** Catalog price UUID. */ price_id: string; interval?: SubscriptionInterval; interval_count?: number; amount?: string; currency?: string; token_id?: string; network_id?: string; }) | (SubscriptionBaseParams & { price_id?: never; /** Subscription interval */ interval: SubscriptionInterval; /** Amount to charge (e.g., "100.00") */ amount: string; /** Currency code (e.g., "usd") */ currency: string; /** Token ID (UUID) */ token_id: string; /** Network ID (UUID) */ network_id: string; interval_count?: number; }); interface SubscriptionUpdateParams { price_id?: string; description?: string; amount?: string; currency?: string; token_id?: string; network_id?: string; collection_method?: SubscriptionCollectionMethod; cancel_at?: string | null; cancel_at_period_end?: boolean; days_until_due?: number; trial_end?: string; metadata?: Record; withdrawal_addresses?: Record; pause_collection?: { behavior: 'void' | 'keep_as_draft'; } | null; return_url?: string | null; cancel_url?: string | null; } interface SubscriptionCancelParams { cancellation_details?: { comment?: string; feedback?: 'too_expensive' | 'missing_features' | 'switched_service' | 'unused' | 'other'; }; } interface SubscriptionListParams { status?: SubscriptionStatus; collection_method?: SubscriptionCollectionMethod; current_period_start?: { gt?: string; gte?: string; lt?: string; lte?: string; }; current_period_end?: { gt?: string; gte?: string; lt?: string; lte?: string; }; created?: { gt?: string; gte?: string; lt?: string; lte?: string; }; limit?: number; starting_after?: string; ending_before?: string; } interface SubscriptionListResponse { data: Subscription[]; has_more: boolean; } /** * Parameters for listing payment links for a subscription (cursor pagination) */ interface SubscriptionPaymentLinksListParams { limit?: number; starting_after?: string; ending_before?: string; } /** * Webhook event types */ type WebhookEventType = 'payment_intent.completed' | 'payment_intent.processing' | 'payment_intent.canceled' | 'payment_intent.requires_payment_method' | 'payment_intent.requires_confirmation' | 'subscription.created' | 'subscription.updated' | 'subscription.canceled' | 'subscription.paused' | 'subscription.resumed' | 'subscription.trial_will_end' | 'subscription.payment_link.created' | 'subscription.payment_link.paid' | 'subscription.payment_link.payment_failed' | 'subscription.past_due' | 'subscription.completed'; /** * Webhook event data object */ interface WebhookEventData { /** * Payment Intent or Subscription object (depends on event type) */ object: PaymentIntent | Subscription; } /** * Webhook event structure */ interface WebhookEvent { /** * Event type */ type: WebhookEventType; /** * Event data */ data: WebhookEventData; /** * Unix timestamp when the event was created */ created: number; } /** * Parameters for fiat-to-USDC quote */ interface FiatQuoteParams { /** * Amount in source currency (e.g. "100000") */ amount: string; /** * Source currency code (e.g. "irr", "usd") */ currency: string; } /** * Fiat-to-USDC quote response */ interface FiatQuote { /** * Amount in USD */ amountUsd: string; /** * Amount in USDC (same as USD for stablecoin) */ amountUsdc: string; /** * Original amount in source currency */ sourceAmount: string; /** * Source currency code */ sourceCurrency: string; } /** * Currency from the price API */ interface Currency { id: string; code: string; name: string; symbol?: string | null; decimals: number; isActive: boolean; createdAt: string; updatedAt: string; } /** * HTTP client for making requests to the OrcaRail API */ declare class HttpClient { private readonly apiKey; private readonly apiSecret; private readonly baseUrl; private readonly timeout; constructor(apiKey: string, apiSecret: string, config?: OrcaRailConfig); /** * Create Basic Auth header from API key and secret */ private getAuthHeader; /** * Build full URL from path */ private buildUrl; /** * Make an HTTP request with timeout and error handling */ private request; /** * GET request */ get(path: string, requireAuth?: boolean): Promise; /** * POST request */ post(path: string, body?: unknown, requireAuth?: boolean): Promise; /** * PATCH request */ patch(path: string, body?: unknown, requireAuth?: boolean): Promise; /** * PUT request */ put(path: string, body?: unknown, requireAuth?: boolean): Promise; /** * DELETE request (optional body for APIs that accept it, e.g. subscription cancel) */ delete(path: string, body?: unknown, requireAuth?: boolean): Promise; } /** * Pay resource for slug-based pay flows (public endpoints) */ declare class Pay { private readonly client; constructor(client: HttpClient); /** * Get pay details by slug * * @param slug - Pay slug from the payment link URL * @returns Pay details including payment intent */ get(slug: string): Promise>; /** * Cancel payment intent by pay slug * * @param slug - Pay slug from the payment link URL * @returns The canceled payment intent and optional cancel_url for redirect */ cancel(slug: string): Promise; } /** * Payment Intents resource for managing payment intents */ declare class PaymentIntents { private readonly client; constructor(client: HttpClient); /** * Create a new Payment Intent * * @param params - Payment Intent creation parameters * @returns The created Payment Intent */ create(params: PaymentIntentCreateParams): Promise; /** * Retrieve a Payment Intent by ID * * @param id - Payment Intent ID (raw, no prefix) * @returns The Payment Intent */ retrieve(id: string): Promise; /** * Cancel a Payment Intent (API: POST /payment_intents/:id/cancel). * Use when the user is redirected to your cancel_url (e.g. https://yourapp.com/cancel?payment_intent=20) * and you want to mark the intent as canceled on the backend. * * @param id - Payment Intent ID (raw, no prefix) * @returns The canceled Payment Intent * * @example * // When user lands on https://localhost:3001/cancel?payment_intent=20 * const intent = await orcarail.paymentIntents.cancel('20'); */ cancel(id: string): Promise; /** * Confirm a Payment Intent (API: POST /payment_intents/:id/confirm). * Redirects the customer to the hosted pay page. * * @param id - Payment Intent ID (raw, no prefix) * @param params - Confirmation parameters including client_secret and return_url * @returns The confirmed Payment Intent * * @example * const intent = await orcarail.paymentIntents.confirm('20', { * client_secret: intent.client_secret, * return_url: 'https://yourapp.com/return', * }); */ confirm(id: string, params: PaymentIntentConfirmParams): Promise; /** * Complete a Payment Intent (API: POST /payment_intents/:id/complete). * Sets the intent to processing; when payment is done, payment_intent.completed is sent. * Use when the user is redirected to your success/return URL (e.g. https://yourapp.com/success?payment_intent=34). * * @param id - Payment Intent ID (raw, no prefix) * @returns The updated Payment Intent (status processing) * * @example * // When user lands on https://localhost:3001/success?payment_intent=34 * const intent = await orcarail.paymentIntents.complete('34'); */ complete(id: string): Promise; /** * Update a Payment Intent * * @param id - Payment Intent ID (raw, no prefix) * @param params - Update parameters (all optional) * @returns The updated Payment Intent */ update(id: string, params: PaymentIntentUpdateParams): Promise; } /** * Exchange rates / fiat quote resource (GET /v1/rates/...) */ declare class Rates { private readonly client; constructor(client: HttpClient); /** * Get a fiat-to-USDC quote: convert an amount in a source currency to USD/USDC. */ getFiatQuote(params: FiatQuoteParams): Promise; /** * List supported fiat currencies. */ getCurrencies(options?: { active?: boolean; }): Promise; } declare class Products { private readonly client; constructor(client: HttpClient); private unwrapList; list(organizationId: string): Promise; create(organizationId: string, params: ProductCreateParams): Promise; update(organizationId: string, productId: string, params: ProductUpdateParams): Promise; delete(organizationId: string, productId: string): Promise<{ id: string; object: 'product'; deleted: true; }>; } /** * Organization catalog prices under `/organizations/:id/prices`. */ declare class Prices { private readonly client; constructor(client: HttpClient); private unwrapList; list(organizationId: string, params?: PriceListParams): Promise; create(organizationId: string, params: PriceCreateParams): Promise; update(organizationId: string, priceId: string, params: PriceUpdateParams): Promise; deactivate(organizationId: string, priceId: string): Promise; /** Active recurring prices (subscriptions). */ listActiveRecurring(organizationId: string): Promise; /** * Find an active one-time price by fiat amount, currency, and parent product name. */ findOneTimeByAmount(organizationId: string, params: { amount: string; currencyCode: string; productName: string; }): Promise; /** * Return an existing one-time price or create product + price. */ ensureOneTime(organizationId: string, params: { amount: string; currencyCode: string; tokenId: string; networkId: string; productName: string; productDescription?: string; productMetadata?: Record; }): Promise; } /** * Subscriptions resource */ declare class Subscriptions { private readonly client; constructor(client: HttpClient); /** * Create a subscription * * @param params - Subscription creation parameters (snake_case) * @returns The created subscription */ create(params: SubscriptionCreateParams): Promise; /** * Retrieve a subscription by ID * * @param id - Subscription ID * @returns The subscription */ retrieve(id: string): Promise; /** * Update a subscription * * @param id - Subscription ID * @param params - Update parameters (all optional) * @returns The updated subscription */ update(id: string, params: SubscriptionUpdateParams): Promise; /** * Cancel a subscription (immediate or at period end) * * @param id - Subscription ID * @param params - Optional cancellation details (comment, feedback) * @returns The canceled subscription */ cancel(id: string, params?: SubscriptionCancelParams): Promise; /** * Resume a paused subscription * * @param id - Subscription ID * @returns The resumed subscription */ resume(id: string): Promise; /** * List subscriptions with optional filters and cursor-based pagination * * @param params - Optional list parameters (status, collection_method, date filters, limit, cursor) * @returns Paginated list of subscriptions */ list(params?: SubscriptionListParams): Promise; /** * List payment links (cycle invoices) for a subscription * * @param id - Subscription ID * @param params - Optional pagination (limit, starting_after, ending_before) * @returns Paginated list of payment links */ listPaymentLinks(id: string, params?: SubscriptionPaymentLinksListParams): Promise<{ data: PaymentLink[]; has_more: boolean; }>; } /** * Webhook utilities for verifying webhook signatures */ declare class Webhooks { /** * Verify webhook signature * * @param rawBody - Raw request body (string or Buffer) * @param signature - Signature from x-webhook-signature header * @param secret - API key secret (sk_live_...) used to verify the HMAC signature * @returns True if signature is valid, false otherwise */ verifySignature(rawBody: string | Buffer, signature: string, secret: string): boolean; /** * Construct and verify a webhook event from raw body and signature * * @param rawBody - Raw request body (string or Buffer) * @param signature - Signature from x-webhook-signature header * @param secret - API key secret (sk_live_...) used to verify the HMAC signature * @returns Parsed webhook event * @throws OrcaRailSignatureVerificationError if signature is invalid */ constructEvent(rawBody: string | Buffer, signature: string, secret: string): WebhookEvent; } /** * Optional metadata shape for demo / dashboard catalog products (subscription tiers). * API stores arbitrary JSON on `CatalogProduct.metadata`; this documents a supported convention. */ interface OrcaRailCatalogPlanProductMetadata { seedKey?: string; tier?: 'free' | 'go' | 'plus' | 'pro' | string; tagline?: string; features?: string[]; featuresHeader?: string; badge?: string; footerNote?: string; highlight?: boolean; displayPriceNote?: string; strikePriceNote?: string; /** When true, show as a non-purchasable tier (no recurring price). */ uiOnly?: boolean; } declare function parseCatalogPlanMetadata(raw: Record | null | undefined): OrcaRailCatalogPlanProductMetadata | null; /** * Base error class for all OrcaRail errors */ declare class OrcaRailError extends Error { constructor(message: string); } /** * Error thrown when the API returns a non-2xx status code */ declare class OrcaRailAPIError extends OrcaRailError { /** * HTTP status code */ readonly statusCode: number; /** * Error type from the API response */ readonly type?: string; /** * Additional error details from the API */ readonly details?: unknown; constructor(message: string, statusCode: number, type?: string, details?: unknown); } /** * Error thrown when authentication fails (401) */ declare class OrcaRailAuthenticationError extends OrcaRailAPIError { constructor(message?: string); } /** * Error thrown when webhook signature verification fails */ declare class OrcaRailSignatureVerificationError extends OrcaRailError { /** * The signature that was provided */ readonly signature: string; constructor(message?: string, signature?: string); } /** * OrcaRail Node.js SDK * * @example * ```typescript * import OrcaRail from '@orcarail/node'; * * const orcarail = new OrcaRail('ak_live_xxx', 'sk_live_xxx'); * * // Create a payment intent * const intent = await orcarail.paymentIntents.create({ * amount: '100.00', * currency: 'usd', * payment_method_types: ['crypto'], * tokenId: 1, * networkId: 1, * return_url: 'https://merchant.example.com/return', * }); * ``` */ declare class OrcaRail { /** * Payment Intents resource */ readonly paymentIntents: PaymentIntents; /** * Subscriptions resource */ readonly subscriptions: Subscriptions; /** * Pay resource (slug-based get/cancel) */ readonly pay: Pay; /** * Exchange rates / fiat quote resource */ readonly rates: Rates; /** * Catalog products */ readonly products: Products; /** * Catalog prices */ readonly prices: Prices; /** * Webhooks utilities */ readonly webhooks: Webhooks; private readonly client; /** * Create a new OrcaRail client instance * * @param apiKey - Your OrcaRail API key (e.g., "ak_live_xxx") * @param apiSecret - Your OrcaRail API secret (e.g., "sk_live_xxx") * @param config - Optional configuration */ constructor(apiKey: string, apiSecret: string, config?: OrcaRailConfig); } export { type CatalogListEnvelope, type CatalogPrice, type CatalogPriceCreateParams, type CatalogPriceListParams, type CatalogPriceRecurring, type CatalogPriceSummary, type CatalogPriceUpdateParams, type CatalogProduct, type CatalogProductCreateParams, type CatalogProductSummary, type CatalogProductUpdateParams, type Currency, type ExpandedPriceSummary, type FiatQuote, type FiatQuoteParams, type LatestTransaction, OrcaRail, OrcaRailAPIError, OrcaRailAuthenticationError, type OrcaRailCatalogPlanProductMetadata, type OrcaRailConfig, OrcaRailError, OrcaRailSignatureVerificationError, type PaymentIntent, type PaymentIntentConfirmParams, type PaymentIntentCreateParams, type PaymentIntentStatus, type PaymentIntentUpdateParams, type PaymentLink, type PriceCreateParams, type PriceListParams, type PriceUpdateParams, type ProductCreateParams, type ProductDataInlineParams, type ProductSummary, type ProductUpdateParams, type Subscription, type SubscriptionAutoCharge, type SubscriptionCancelParams, type SubscriptionCollectionMethod, type SubscriptionCreateParams, type SubscriptionInterval, type SubscriptionListParams, type SubscriptionListResponse, type SubscriptionPaymentLinksListParams, type SubscriptionStatus, type SubscriptionUpdateParams, type WebhookEvent, type WebhookEventData, type WebhookEventType, OrcaRail as default, parseCatalogPlanMetadata };