import { BaseResource } from './BaseResource.js'; import type { RequestOptions } from '../types/common.js'; import type { Processor, ProcessorCreateParams, ProcessorUpdateParams, StripeConnectInitiateParams, StripeConnectInitiateResponse, StripeConnectDisconnectParams, StripeAccountDetails } from '../types/processors.js'; /** * Processors represent the payment gateways/PSPs connected to your Tagada * account. Tagada is gateway-agnostic: you can connect Stripe, Adyen, NMI, * Checkout.com, or any supported processor and route between them. */ export declare class Processors extends BaseResource { /** * List all active processors for the account. */ list(opts?: RequestOptions): Promise<{ processors: Processor[]; }>; /** * Retrieve a single processor by ID. */ retrieve(processorId: string, opts?: RequestOptions): Promise; /** * Create a new processor connection. * * @example * const processor = await tagada.processors.create({ * processor: { * name: 'Stripe US', * type: 'stripe', * enabled: true, * supportedCurrencies: ['USD', 'EUR'], * baseCurrency: 'USD', * options: { * secretKey: 'sk_live_...', * publicKey: 'pk_live_...', * }, * }, * }); */ create(params: ProcessorCreateParams, opts?: RequestOptions): Promise<{ processor: Processor; }>; /** * Update an existing processor's configuration. */ update(params: ProcessorUpdateParams, opts?: RequestOptions): Promise<{ processor: Processor; }>; /** * Delete (archive) one or more processors. */ del(processorIds: string[], opts?: RequestOptions): Promise<{ processors: string[]; }>; /** * Initiate a Stripe Connect OAuth flow. Returns a URL that the merchant * must visit in their browser to authorize TagadaPay to use their Stripe * account. * * After the merchant completes the OAuth flow, Stripe redirects back to * TagadaPay, which saves the connected account credentials on the * processor automatically. * * @example * const { url } = await tagada.processors.initiateStripeConnect({ * processorId: 'processor_abc123', * }); * // Redirect the merchant to `url` in their browser */ initiateStripeConnect(params: StripeConnectInitiateParams, opts?: RequestOptions): Promise; /** * Disconnect a Stripe Connect account from a processor. * Revokes the OAuth authorization and disables the processor. * * @example * await tagada.processors.disconnectStripe({ * accountId: 'acct_1234567890', * processorId: 'processor_abc123', * }); */ disconnectStripe(params: StripeConnectDisconnectParams, opts?: RequestOptions): Promise<{ success: boolean; }>; /** * Retrieve details about a connected Stripe account (capabilities, * charges enabled, country, etc.). * * @example * const details = await tagada.processors.getStripeAccountDetails('acct_1234567890'); * console.log(details.charges_enabled, details.country); */ getStripeAccountDetails(accountId: string, opts?: RequestOptions): Promise; } //# sourceMappingURL=Processors.d.ts.map