# useCheckout

> @web3auth/modal Vue Composable useCheckout | Embedded Wallets

Composable to show the cryptocurrency checkout modal using Wallet Services plugin.

:::info

Please note that this composable doesn't work for external wallet logins. It only works for social login embedded wallets.

:::

### Import

```ts

```

### Usage

```html
<script setup lang="ts">

  const { showCheckout, loading, error } = useCheckout()
</script>

<template>
  <button @click="showCheckout" :disabled="loading">
    {{ loading ? "Opening Checkout..." : "Show Checkout" }}
  </button>
  Error: {{ error.message }}
</template>
```

### Return type

```ts

```

#### `loading`

`boolean`

Whether the checkout process is in progress.

#### `error`

`Web3AuthError | null`

Error that occurred during the checkout process.

#### `showCheckout`

`(showCheckoutParams?: BaseEmbedControllerState["showCheckout"]) => Promise<void>`

Function to initiate the checkout modal. Optional `showCheckoutParams` can be passed to customize the modal.
