/** * This file was auto-generated by openapi-typescript and ts-morph. * Do not make direct changes to the file. */ export interface paths { readonly "/payments/methods": { readonly parameters: { readonly query?: never; readonly header: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept: components["parameters"]["Accept"]; }; readonly path?: never; readonly cookie?: never; }; /** * Get Accepted Payment Methods * @description Returns a list of accepted payment methods based on the `order_id` or `checkout_id`. * * **Notes** * * Use the [Create an Order](/docs/rest-management/orders#create-an-order) endpoint to generate the `order_id`. * * Orders created will be set to incomplete order status. * * The cart ID and checkout ID are the same. * * **Required Fields** * * `order_id` or `checkout_id` */ readonly get: operations["getPaymentMethods"]; }; } export type webhooks = Record; export interface components { schemas: { /** paymentMethodStoredInstrument */ readonly paymentMethodStoredInstrument: { /** @description Brand of this card such as VISA or Mastercard */ readonly brand: string; /** * Format: int32 * @description Expiry month of this card */ readonly expiry_month: number; /** * Format: int32 * @description Expiry year of this card */ readonly expiry_year: number; /** @description Issuer identification number of this card. This is extracted from the card when the order is paid for. */ readonly issuer_identification_number: string; /** @description Last four numbers of this card */ readonly last_4: string; /** @description A BigCommerce-generated identifier that represents the stored card. */ readonly token: string; /** * @description Whether this instrument is a default instrument * @default false * @example false */ readonly is_default: boolean; /** * @description Type to classify this stored card * @default stored_card * @example stored_card */ readonly type: string; }; /** paymentMethod_Full */ readonly paymentMethod_Full: { /** @description Identifier for this payment method */ readonly id: string; /** @description Name of this payment method */ readonly name: string; readonly stored_instruments?: readonly components["schemas"]["paymentMethodStoredInstrument"][]; readonly supported_instruments: readonly { /** * InstrumentType * @description Type of this instrument * @example VISA * @enum {string} */ readonly instrument_type: "VISA" | "MASTERCARD" | "DISCOVER" | "AMEX" | "DINERS_CLUB" | "JCB" | "DANKORT" | "MAESTRO" | "STORED_CARD"; /** @description Whether verification value is required for payment */ readonly verification_value_required?: boolean; }[]; /** * @description Whether this payment method is on test mode * @default false * @example false */ readonly test_mode: boolean; /** * @description Type to classify this payment method * @default card * @example card */ readonly type: string; }; }; responses: { readonly paymentsMethods_Resp: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly data?: readonly components["schemas"]["paymentMethod_Full"][]; /** @description Response metadata. */ readonly meta?: { readonly [key: string]: unknown; }; }; }; }; }; parameters: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept: string; /** @description The ID of the subject order. */ readonly OrderIdQuery: number; /** @description The ID of the subject checkout; identical to the cart ID. */ readonly CheckoutIdQuery: string; }; requestBodies: never; headers: never; pathItems: never; } export type $defs = Record; export interface operations { readonly getPaymentMethods: { readonly parameters: { readonly query?: { /** @description The ID of the subject order. */ readonly order_id?: components["parameters"]["OrderIdQuery"]; /** @description The ID of the subject checkout; identical to the cart ID. */ readonly checkout_id?: components["parameters"]["CheckoutIdQuery"]; }; readonly header?: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept?: components["parameters"]["Accept"]; }; readonly path?: never; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { readonly 200: components["responses"]["paymentsMethods_Resp"]; /** @description Request has been rejected */ readonly 400: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { /** * Format: int32 * @description HTTP status code */ readonly status: number; /** @description Short summary describing the particular error */ readonly title: string; /** @description Detailed summary describing the particular error */ readonly detail?: string; /** @description Reference that identifies the particular error */ readonly type: string; /** * Format: int32 * @description Code representing the particular error */ readonly code?: number; readonly errors?: { readonly [key: string]: string; }; }; }; }; /** @description Valid authentication required */ readonly 401: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { /** * Format: int32 * @description HTTP status code */ readonly status: number; /** @description Short summary describing the particular error */ readonly title: string; /** @description Detailed summary describing the particular error */ readonly detail?: string; /** @description Reference that identifies the particular error */ readonly type: string; /** * Format: int32 * @description Code representing the particular error */ readonly code?: number; readonly errors?: { readonly [key: string]: string; }; }; }; }; /** @description Request has been rejected due to resource not being found */ readonly 404: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { /** * Format: int32 * @description HTTP status code */ readonly status: number; /** @description Short summary describing the particular error */ readonly title: string; /** @description Detailed summary describing the particular error */ readonly detail?: string; /** @description Reference that identifies the particular error */ readonly type: string; /** * Format: int32 * @description Code representing the particular error */ readonly code?: number; readonly errors?: { readonly [key: string]: string; }; }; }; }; /** @description Request has been rejected due to missing or invalid data */ readonly 422: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { /** * Format: int32 * @description HTTP status code */ readonly status: number; /** @description Short summary describing the particular error */ readonly title: string; /** @description Detailed summary describing the particular error */ readonly detail?: string; /** @description Reference that identifies the particular error */ readonly type: string; /** * Format: int32 * @description Code representing the particular error */ readonly code?: number; readonly errors?: { readonly [key: string]: string; }; }; }; }; /** @description Internal server error */ readonly default: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { /** * Format: int32 * @description HTTP status code */ readonly status: number; /** @description Short summary describing the particular error */ readonly title: string; /** @description Detailed summary describing the particular error */ readonly detail?: string; /** @description Reference that identifies the particular error */ readonly type: string; /** * Format: int32 * @description Code representing the particular error */ readonly code?: number; readonly errors?: { readonly [key: string]: string; }; }; }; }; }; }; }