Home > @vue-storefront/magento-api > getAvailablePaymentMethods
getAvailablePaymentMethods() function
Fetches the available payment methods for the received cart.
Signature:
export default function getAvailablePaymentMethods(context: Context, params: {
cartId: string;
}, customQuery?: CustomQuery, customHeaders?: CustomHeaders): Promise<ApolloQueryResult<GuestAvailablePaymentMethodsQuery>>;
Parameters
Parameter | Type | Description |
---|---|---|
context | Context | VSF context |
params | { cartId: string; } | params containing the cart's ID |
customQuery | CustomQuery | (Optional) (optional) - custom GraphQL query that extends the default query |
customHeaders | CustomHeaders | (Optional) (optional) - custom headers that extends the default headers |
Returns:
Promise<ApolloQueryResult<GuestAvailablePaymentMethodsQuery>>