Skip to content

setCurrentPaymentMethod

setCurrentPaymentMethod

Definition

Set the current session's payment method to correspoding to id

Signature

ts
export async function setCurrentPaymentMethod(
  newPaymentMethodId: string,
  contextInstance: ShopwareApiInstance = defaultInstance,
): Promise<ContextTokenResponse>

Parameters

NameTypeDescription
newPaymentMethodId
string
id of the payment method
contextInstance
ShopwareApiInstance
instance of the api client (by default it's an Axios instance)

Return type

ts
Promise<ContextTokenResponse>

Usage example

WARNING

Example is generated automatically. Sometimes it's required to be adjusted to your needs.

Open in StackBlitz