import type { TagadaClientOptions } from './types/common.js'; import { Payments } from './resources/Payments.js'; import { Customers } from './resources/Customers.js'; import { Orders } from './resources/Orders.js'; import { Stores } from './resources/Stores.js'; import { Subscriptions } from './resources/Subscriptions.js'; import { Products } from './resources/Products.js'; import { Checkout } from './resources/Checkout.js'; import { PaymentFlows } from './resources/PaymentFlows.js'; import { PaymentInstruments } from './resources/PaymentInstruments.js'; import { Webhooks } from './resources/Webhooks.js'; import { Funnels } from './resources/Funnels.js'; import { Events } from './resources/Events.js'; import { Processors } from './resources/Processors.js'; import { Domains } from './resources/Domains.js'; import { Promotions, PromotionCodes } from './resources/Promotions.js'; import { BlockRules } from './resources/BlockRules.js'; import { Plugins } from './resources/Plugins.js'; import { Offers } from './resources/Offers.js'; import { CheckoutOffers } from './resources/CheckoutOffers.js'; import { EmailTemplates } from './resources/EmailTemplates.js'; import { ShippingRates } from './resources/ShippingRates.js'; import { TaxExemptions } from './resources/TaxExemptions.js'; import { Shopify } from './resources/Shopify.js'; import { Partners } from './resources/Partners.js'; import { Processing } from './resources/Processing.js'; import { PaymentSetup } from './resources/PaymentSetup.js'; import { Threeds } from './resources/Threeds.js'; import { Rx } from './resources/Rx.js'; import { OnboardingClient, type OnboardingClientOptions } from './onboarding/OnboardingClient.js'; /** * The Tagada Node.js SDK client. * * Tagada is a **PSP/gateway-agnostic** payment orchestration platform. * Connect any combination of payment processors (Stripe, Adyen, NMI, * Checkout.com, etc.) and let Tagada handle intelligent routing, cascading * fallbacks, 3DS, and recurring billing across all of them. * * @example * ```ts * import Tagada from '@tagadapay/node-sdk'; * * const tagada = new Tagada('your-api-key'); * * // List payments * const payments = await tagada.payments.list({ * filters: { status: ['captured'] }, * pagination: { page: 1, pageSize: 25 }, * }); * * // Process a payment — Tagada routes it across your processors * const { payment } = await tagada.payments.process({ * amount: 4999, * currency: 'USD', * storeId: 'store_xxx', * paymentInstrumentId: 'pi_xxx', * }); * * // Create a cascading payment flow * const flow = await tagada.paymentFlows.create({ * data: { * name: 'US Flow', * strategy: 'cascade', * fallbackMode: 'sequential', * maxFallbackRetries: 3, * threeDsEnabled: true, * stickyProcessorEnabled: false, * pickProcessorStrategy: 'weighted', * processorConfigs: [ * { processorId: 'proc_stripe', weight: 60 }, * { processorId: 'proc_adyen', weight: 40 }, * ], * fallbackProcessorConfigs: [ * { processorId: 'proc_nmi', orderIndex: 0 }, * ], * }, * }); * ``` */ export declare class Tagada { readonly payments: Payments; readonly customers: Customers; readonly orders: Orders; readonly stores: Stores; readonly subscriptions: Subscriptions; readonly products: Products; readonly checkout: Checkout; readonly paymentFlows: PaymentFlows; readonly paymentInstruments: PaymentInstruments; readonly webhooks: Webhooks; readonly funnels: Funnels; readonly events: Events; readonly processors: Processors; readonly domains: Domains; readonly promotions: Promotions; readonly promotionCodes: PromotionCodes; readonly blockRules: BlockRules; readonly plugins: Plugins; readonly offers: Offers; readonly checkoutOffers: CheckoutOffers; readonly emailTemplates: EmailTemplates; /** * Shipping rates control which delivery options Tagada surfaces at * checkout. Without at least one matching rate, checkout still works * but the customer sees no delivery section. Required for stores that * ship physical goods. * * @see {@link ShippingRates} */ readonly shippingRates: ShippingRates; /** * Tax exemptions let you exclude specific customer emails from tax * at checkout. Useful for wholesale, B2B, or tax-exempt customers. * * @see {@link TaxExemptions} */ readonly taxExemptions: TaxExemptions; /** * Manage the Tagada checkout script injected into a connected Shopify * store's theme (`tagada.shopify.checkScript/updateScript/removeScript/audit`). * Binding the script to a funnel/step controls which checkout — and payment * routing — the storefront uses. Requires Shopify connected on the store. * * @see {@link Shopify} */ readonly shopify: Shopify; /** * Processing domain (TagadaPay Processing) for a **direct merchant** managing * their own TPAs: `tagada.processing.tpas.*`, plus nested `keys`, * `requirements`, and `documents`. Served on `/api/tagadapay/v1`. * * Partners provision processing on behalf of merchants via * `tagada.partners.processing.*` instead. * * @see https://docs.tagadapay.com/developer-tools/processing/introduction */ readonly processing: Processing; /** * Partner ("on behalf of") namespace, split by domain: * - `partners.crm.*` — provision merchants + mint CRM keys * - `partners.processing.*` — provision TPAs, KYB, processing keys * * Requires a partner-scoped API key (`tp_sk_partner_*`) for write operations. * * @see https://docs.tagadapay.com/developer-tools/partners/introduction */ readonly partners: Partners; /** * Payment setup discovery (`tagada.paymentSetup.get(storeId)`). Returns * the runtime payment configuration for a store: which methods are * enabled, which processors handle them, and the metadata needed to * render the right UI in the browser. * * @see https://docs.tagadapay.com/developer-tools/partners/payment-setup */ readonly paymentSetup: PaymentSetup; /** * 3D Secure session management. Used in the partner S2S flow to run * a 3DS challenge between tokenization and charge. * * @see https://docs.tagadapay.com/developer-tools/partners/payments */ readonly threeds: Threeds; /** * Tagada Rx — telehealth/Rx integration namespace. Opt-in, paid * add-on; the resource methods will return integration-state * errors until the merchant activates Tagada Rx and pays the * setup fee. * * @see {@link Rx} */ readonly rx: Rx; constructor(apiKeyOrOptions: string | TagadaClientOptions); /** * Returns a public, no-auth client for the **Tagada onboarding** flow. * Use this to provision a fresh sandbox Tagada account from a CLI script * *without* an API key — the verify call returns a key you can plug * into `new Tagada(...)`. * * For an interactive experience, ship `tagada-init` (the bin shipped * with this package) instead of writing your own prompt loop. * * Naming: the package is `@tagadapay/node-sdk` (the SDK for the * TagadaPay payment processor), but the *account* you provision here * is a **Tagada** account — the CRM / control-plane that hosts your * stores, products, and processor configuration. The processor is * one of several products available inside that account. * * @example * ```ts * import Tagada from '@tagadapay/node-sdk'; * * const onb = Tagada.public(); * await onb.start({ email: 'me@example.com', source: 'cli' }); * const { apiKey } = await onb.verify({ * email: 'me@example.com', * code: '384921', * }); * * const tagada = new Tagada(apiKey); * ``` * * @see {@link OnboardingClient} */ static public(opts?: OnboardingClientOptions): OnboardingClient; } //# sourceMappingURL=Tagada.d.ts.map