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
| Name | Required | Type | Description |
|---|---|---|---|
props | Required | CustomerDeletePaymentInstrumentParams | Parameter 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
CustomerDeletePaymentInstrumentParamsCustomerDeletePaymentInstrumentResult
Examples
Deletes an existing saved customer payment instrument.
import { sdk } from '~/sdk.config.ts';
const category = await sdk.commerce.deletePaymentInstrument({
paymentInstrumentId: 'Home',
});