getPaymentMethods
Fetches available payment methods for user's cart.
The method works only if user already saved billing address. It communicates with the getPaymentMethods endpoint of the Vue Storefront API Middleware. In turn, it obtains the customer's reference and cart based on the access token and calls the POST /paymentMethods Adyen endpoint indirectly via commercetools, using Adyen commercetools.
Signature
export declare function getPaymentMethods(
props?: GetPaymentMethodsParams,
options?: MethodOptions
): Promise<GetPaymentMethodsResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
props | Optional | GetPaymentMethodsParams | Parameter object which can be used with this method. Refer to its type definition to learn about possible properties. |
options | Optional | MethodOptions | Options that can be passed to additionally configure the request or customize the logic in a plugin. |
Returns
Returns Promise<GetPaymentMethodsResponse>
Referenced Types
- GetPaymentMethodsParams
- MethodOptions
GetPaymentMethodsResponse
Examples
Fetching available payment methods.
import { sdk } from '~/sdk.config.ts';
const response = await sdk.adyen.getPaymentMethods();