import { BaseResource } from './BaseResource.js'; import type { RequestOptions } from '../types/common.js'; import type { CheckoutInitParams, CheckoutPayParams, CheckoutPayResult } from '../types/checkout.js'; export declare class Checkout extends BaseResource { /** * Initialize a checkout session and get the redirect URL + checkout token. * The API returns a 302 redirect — this method captures it and returns * the URL and token without following the redirect. */ createSession(params: CheckoutInitParams, opts?: RequestOptions): Promise<{ redirectUrl: string; checkoutToken: string | null; }>; /** * @deprecated Use `createSession` instead. This method follows the 302 redirect * and tries to parse the checkout HTML as JSON, which will fail. */ init(params: CheckoutInitParams, opts?: RequestOptions): Promise<{ redirectUrl: string; checkoutToken?: string; }>; /** * Pay an existing checkout session. Used for server-side checkout flows * where you control the payment form and tokenization. */ pay(params: CheckoutPayParams, opts?: RequestOptions): Promise; /** * Check the async status of a checkout session (e.g. after 3DS redirect). */ asyncStatus(checkoutToken: string, opts?: RequestOptions): Promise; } //# sourceMappingURL=Checkout.d.ts.map