Alokai

removePaymentInstrumentFromBasket

Removes a payment instrument of a basket.

This method communicates with the removePaymentInstrumentFromBasket endpoint of the Vue Storefront API Middleware. In turn, it receives data from the removePaymentInstrumentFromBasket or the Removes a payment instrument from a basket endpoints exposed by SCAPI / OCAPI depending on the middleware configuration.

Signature

export declare function removePaymentInstrumentFromBasket(
	props: BasketPaymentInstrumentRemoveParams & {
    basketId?: string;
}
): Promise<import("commerce-sdk/dist/checkout/checkout").ShopperBaskets.Basket>;

Parameters

NameRequiredTypeDescription
propsRequiredBasketPaymentInstrumentRemoveParams & { basketId?: string; }Parameter object which can be used with this method. Refer to its type definition to learn about possible properties.

Returns

Returns a representation of a Basket object.

Possible Reponses

404 | PaymentInstrumentNotFoundException - Indicates that the payment instrument with the given payment instrument number ( paymentInstrumentId (String) ) is unknown.

Referenced Types

  • BasketPaymentInstrumentRemoveParams
  • ShopperBaskets.Basket

Examples

Removing a payment instrument from basket by paymentInstrumentId.

import { sdk } from '~/sdk.config.ts';

const basket = await sdk.commerce.removePaymentInstrumentFromBasket({ paymentInstrumentId: 'piId' });

On this page