import { APIResource } from "../core/resource.js"; import { APIPromise } from "../core/api-promise.js"; import { RequestOptions } from "../internal/request-options.js"; /** * Let an agent pay on a customer's behalf with a single-use virtual card. * Connect a customer once, then create a payment — a virtual card is minted * scoped to that purchase and the card details are handed back for checkout. */ export declare class PaymentProviders extends APIResource { /** * Returns your organization's onboarding status for a payment provider. * * @example * ```ts * const paymentProvider = * await client.paymentProviders.retrieve('provider'); * ``` */ retrieve(provider: string, options?: RequestOptions): APIPromise; /** * Begins connecting your organization to a payment provider (e.g. `agentcard`). * Returns a hosted URL where an admin authorizes the connection; on completion the * provider redirects back and Linq stores your connected credentials. * * @example * ```ts * const response = await client.paymentProviders.connect( * 'provider', * { * return_url: 'https://partner.example/settings/payments', * }, * ); * ``` */ connect(provider: string, body: PaymentProviderConnectParams, options?: RequestOptions): APIPromise; } export interface PaymentProvider { provider?: string; status?: 'onboarding' | 'ready' | 'disabled'; } export interface PaymentProviderConnectResponse { /** * Send the admin here to authorize the connection. */ hosted_url?: string; session_id?: string; status?: string; } export interface PaymentProviderConnectParams { /** * Where to send the admin after they authorize the connection. */ return_url: string; } export declare namespace PaymentProviders { export { type PaymentProvider as PaymentProvider, type PaymentProviderConnectResponse as PaymentProviderConnectResponse, type PaymentProviderConnectParams as PaymentProviderConnectParams, }; } //# sourceMappingURL=payment-providers.d.ts.map