UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

49 lines • 1.7 kB
import { APIResource } from "../../core/resource.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; export declare class BasePayInvoice extends APIResource { static readonly _key: readonly ['accounts', 'payInvoice']; /** * Pays an outstanding invoice for an account. Returns a Stripe client secret when * Strong Customer Authentication (SCA) is required to complete the payment. * * @example * ```ts * const payInvoice = await client.accounts.payInvoice.create({ * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * }); * ``` */ create(params: PayInvoiceCreateParams, options?: RequestOptions): APIPromise<PayInvoiceCreateResponse>; } export declare class PayInvoice extends BasePayInvoice { } export interface PayInvoiceCreateResponse { /** * The Stripe client secret for frontend payment confirmation. */ client_secret?: string; } export interface PayInvoiceCreateParams { /** * Path param: Identifier */ account_id: string; /** * Body param: The identifier of the invoice to pay. */ invoice_id?: string; /** * Body param: The payment method to use. If omitted, the default payment method is * used. */ payment_method_id?: string; /** * Body param: Whether to validate the payment method before processing. */ validate_payment_method?: boolean; } export declare namespace PayInvoice { export { type PayInvoiceCreateResponse as PayInvoiceCreateResponse, type PayInvoiceCreateParams as PayInvoiceCreateParams, }; } //# sourceMappingURL=pay-invoice.d.ts.map