Home > @vue-storefront/magento-api > placeOrder

placeOrder() function

Places an order for received cart.

Signature:

export default function placeOrder(context: Context, input: PlaceOrderInput, customQuery?: CustomQuery, customHeaders?: CustomHeaders): Promise<FetchResult<PlaceOrderMutation>>;

Parameters

Parameter Type Description
context Context VSF Context
input PlaceOrderInput the order's input, 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<FetchResult<PlaceOrderMutation>>