Alokai

deletePaymentInstrument

Deletes a saved payment instrument of the signed-in customer by id.

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

Signature

export declare function deletePaymentInstrument(
	props: CustomerDeletePaymentInstrumentParams
): Promise<CustomerDeletePaymentInstrumentResult>;

Parameters

NameRequiredTypeDescription
propsRequiredCustomerDeletePaymentInstrumentParamsParameter object which can be used with this method. Refer to its type definition to learn about possible properties.

Returns

Returns an operation status object.

Referenced Types

  • CustomerDeletePaymentInstrumentParams
  • CustomerDeletePaymentInstrumentResult

Examples

Deletes an existing saved customer payment instrument.

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

const category = await sdk.commerce.deletePaymentInstrument({
  paymentInstrumentId: 'Home',
});

On this page