cloudflare
Version:
The official TypeScript library for the Cloudflare API
42 lines • 1.51 kB
TypeScript
import { APIResource } from "../../../core/resource.js";
import { APIPromise } from "../../../core/api-promise.js";
import { RequestOptions } from "../../../internal/request-options.js";
export declare class BasePaymentMethod extends APIResource {
static readonly _key: readonly ['billing', 'profiles', 'paymentMethod'];
/**
* Creates a Stripe payment intent for adding or updating a payment method on the
* account's billing profile. Returns a client secret for frontend payment method
* collection.
*
* @example
* ```ts
* const paymentMethod =
* await client.billing.profiles.paymentMethod.create({
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
* });
* ```
*/
create(params: PaymentMethodCreateParams, options?: RequestOptions): APIPromise<PaymentMethodCreateResponse>;
}
export declare class PaymentMethod extends BasePaymentMethod {
}
export interface PaymentMethodCreateResponse {
/**
* The Stripe client secret for frontend payment method collection.
*/
client_secret?: string;
/**
* The type of Stripe intent created.
*/
intent_type?: string;
}
export interface PaymentMethodCreateParams {
/**
* Identifier
*/
account_id: string;
}
export declare namespace PaymentMethod {
export { type PaymentMethodCreateResponse as PaymentMethodCreateResponse, type PaymentMethodCreateParams as PaymentMethodCreateParams, };
}
//# sourceMappingURL=payment-method.d.ts.map