/** * This file was auto-generated by openapi-typescript and ts-morph. * Do not make direct changes to the file. */ export interface paths { readonly "/payments": { readonly parameters: { readonly query?: never; readonly path?: never; readonly cookie?: never; }; /** * Process Payments * @description Process payments for an order. See [Payment Processing](/docs/store-operations/payments) for more information. */ readonly post: operations["PaymentsPost"]; }; } export type webhooks = Record; export interface components { schemas: { /** Card */ readonly Card: { /** * @description Type to classify this payment instrument (required) * @default card * @example card */ readonly type: string; /** @description Cardholderʼs full name (required) */ readonly cardholder_name?: string; /** @description Credit card number (required) */ readonly number?: string; /** * Format: int32 * @description Expiry month of this card (required) */ readonly expiry_month?: number; /** * Format: int32 * @description Expiry year of this card (required) */ readonly expiry_year?: number; /** @description Verification value of this card (CVV) */ readonly verification_value?: string; /** * Format: int32 * @description Issue month of this card */ readonly issue_month?: number; /** * Format: int32 * @description Issue year of this card */ readonly issue_year?: number; /** * Format: int32 * @description Issue number of this card */ readonly issue_number?: number; }; /** Stored Card */ readonly StoredCard: { /** * @description Type to classify this payment instrument (required) * @default stored_card * @example stored_card */ readonly type: string; /** @description Identifier representing this stored card (required) */ readonly token?: string; /** @description Verification value of this card (CVV) */ readonly verification_value?: string; }; /** StoredPayPalAccount */ readonly StoredPayPalAccount: { /** * @description Type to classify this payment instrument (required) * @enum {string} */ readonly type?: "stored_paypal_account"; /** @description Identifier representing this stored PayPal account (required) */ readonly token?: string; }; /** StoredBankAccount */ readonly StoredBankAccount: { /** * @description Type to classify this payment instrument (required) * @enum {string} */ readonly type?: "stored_bank_account"; /** @description Identifier representing this stored bank account (required) */ readonly token?: string; }; /** GiftCertificate */ readonly GiftCertificate: { /** @example gift_certificate */ readonly type?: string; /** @example ABC-DEF-GXX */ readonly gift_certificate_code?: string; }; /** StoreCredit */ readonly StoreCredit: { /** @example store_credit */ readonly type?: string; }; /** Tokenized Card */ readonly TokenizedCard: { /** * @description Type to classify this payment instrument (required). * @enum {string} */ readonly type: "tokenized_card"; /** @description Identifier representing the tokenized card (required). */ readonly token: string; /** @description Issuer identification number. */ readonly iin?: string; /** @description Last four numbers of this card. */ readonly last_four_digits?: string; /** @description Expiry month of this card. */ readonly expiration_month?: string; /** @description Expiry year of this card. */ readonly expiration_year?: string; }; }; responses: never; parameters: { /** @description This required value must be `application/vnd.bc.v1+json`. */ readonly AcceptPaymentResponse: "application/vnd.bc.v1+json"; /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body. */ readonly ContentType: string; }; requestBodies: never; headers: never; pathItems: never; } export type $defs = Record; export interface operations { readonly PaymentsPost: { readonly parameters: { readonly query?: never; readonly header?: { /** @description This required value must be `application/vnd.bc.v1+json`. */ readonly Accept?: components["parameters"]["AcceptPaymentResponse"]; /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body. */ readonly "Content-Type"?: components["parameters"]["ContentType"]; }; readonly path?: never; readonly cookie?: never; }; readonly requestBody?: { readonly content: { readonly "application/json": { /** Payment */ readonly payment: { readonly instrument: components["schemas"]["Card"] | components["schemas"]["StoredCard"] | components["schemas"]["StoredPayPalAccount"] | components["schemas"]["GiftCertificate"] | components["schemas"]["StoreCredit"] | components["schemas"]["TokenizedCard"] | components["schemas"]["StoredBankAccount"]; /** @description Identifier for payment method that will be used for this payment and `id` from the Get Accepted Payment Methods API */ readonly payment_method_id: string; /** @description To use `save_instrument`, configure the payment gateway to accept stored cards. */ readonly save_instrument?: boolean; }; }; }; }; readonly responses: { /** @description Payment has been successfully processed */ readonly 202: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { /** @description Identifier for this transaction */ readonly id?: string; /** * Transaction Type * @description Transaction type for this payment * @example authorization * @enum {string} */ readonly transaction_type?: "authorization" | "purchase"; /** * Status * @description Status to indicate a success response * @enum {string} */ readonly status?: "success" | "pending"; }; }; }; /** @description Payment request has been rejected due to malformed request */ 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 Payment request has been rejected due to missing, invalid data or declined by payment provider */ 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; }; }; }; }; }; }; }