import { APIResource } from "../../core/resource.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; export declare class PaymentMethods extends APIResource { /** * Retrieve the current payment method information for the brand, including card * details and billing information. Returns null if no payment method is * configured. * * @example * ```ts * const response = * await client.billing.paymentMethods.retrieveCurrent(); * ``` */ retrieveCurrent(options?: RequestOptions): APIPromise; /** * Initiate the payment method setup process by creating a Stripe payment intent. * Returns a client secret that can be used to complete the payment method setup on * the frontend. * * @example * ```ts * const response = * await client.billing.paymentMethods.setup(); * ``` */ setup(options?: RequestOptions): APIPromise; /** * Update the default payment method for the brand. The payment method must be a * valid Stripe payment method ID that belongs to the brand's customer. * * @example * ```ts * const response = * await client.billing.paymentMethods.updateDefault({ * paymentMethodId: 'pm_1234567890abcdef', * }); * ``` */ updateDefault(body: PaymentMethodUpdateDefaultParams, options?: RequestOptions): APIPromise; } /** * Response schema for retrieving payment method details */ export interface PaymentMethodRetrieveCurrentResponse { /** * Stripe payment method ID */ id: string; /** * Card brand (e.g., visa, mastercard) */ brand?: string; /** * Card expiration month */ expMonth?: number; /** * Card expiration year */ expYear?: number; /** * Last 4 digits of the card */ last4?: string; } /** * Response schema for adding a payment method (creating a setup intent) */ export interface PaymentMethodSetupResponse { /** * Client secret for confirming the setup intent on the frontend */ clientSecret: string; /** * Stripe setup intent ID */ intentId: string; } /** * Response schema for updating the brand's default payment method */ export interface PaymentMethodUpdateDefaultResponse { /** * Updated brand information */ brand: PaymentMethodUpdateDefaultResponse.Brand; } export declare namespace PaymentMethodUpdateDefaultResponse { /** * Updated brand information */ interface Brand { /** * Brand unique identifier */ id: string; /** * The billing email address for the brand */ billingEmail: string | null; /** * The primary goal of the brand's marketing efforts */ brandGoal: string; /** * ISO 3166-1 alpha-2 country code */ country: string; /** * ISO 8601 timestamp of when the brand was created */ createdAt: string; /** * Current credits balance in the smallest currency unit (e.g., cents) */ creditsBalance: number; /** * The industry sector the brand operates in */ industry: string; /** * Brand name */ name: string; /** * Stripe customer ID */ stripeCustomerId: string; /** * Stripe payment method ID */ stripePaymentMethodId: string | null; /** * ISO 8601 timestamp of when the brand was last updated */ updatedAt: string; /** * Brand voice and tone guidelines for content creation */ voiceGuidelines: string | null; /** * The brand's official website URL */ website: string | null; /** * How the brand heard about our platform */ whereHearUs: string; } } export interface PaymentMethodUpdateDefaultParams { /** * The Stripe payment method ID to be set as the default payment method. Must start * with 'pm\_'. */ paymentMethodId: string; } export declare namespace PaymentMethods { export { type PaymentMethodRetrieveCurrentResponse as PaymentMethodRetrieveCurrentResponse, type PaymentMethodSetupResponse as PaymentMethodSetupResponse, type PaymentMethodUpdateDefaultResponse as PaymentMethodUpdateDefaultResponse, type PaymentMethodUpdateDefaultParams as PaymentMethodUpdateDefaultParams, }; } //# sourceMappingURL=payment-methods.d.mts.map