Home > @shopware-pwa/shopware-6-client > setDefaultCustomerPaymentMethod

# setDefaultCustomerPaymentMethod() function

Set payment method under provided ID as default

Signature:

export declare function setDefaultCustomerPaymentMethod(paymentMethodId: string, contextInstance?: ShopwareApiInstance): Promise<{
    success: boolean;
}>;

# Parameters

Parameter Type Description
paymentMethodId string
contextInstance ShopwareApiInstance

Returns:

Promise<{ success: boolean; }>

# Exceptions

ClientApiError