> For the complete documentation index, see [llms.txt](https://developer.convergegate.com/legacy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.convergegate.com/legacy/checkout-v3/introduction/methods.md).

# Methods

```
var checkout = new Checkout(/* options */);
checkout.load(".checkout-wrapper");
```

## **load(selector `string`) `void`**

Embed and render the **Checkout** form inside a dom element with **selector** as a querySelector.

```
var checkout = new Checkout(/* options */);
checkout.open();
```

## **open() `void`**

Open the **Checkout** form as overlay component.

```
var checkout = new Checkout(/* options */);
checkout.redirect("https://myserver.com/token-created");
```

## **redirect(url `string`) `void`**

Redirect web browser to **Checkout** form page.

After token is created **Checkout** will redirect to `url` via POST request send to your server all token properties.

In case user close form still will be redirected to `url` including a query parameters `<url>?error=canceled`.

```
var checkout = new Checkout(/* options */);
checkout.destroy();
```

## **destroy() `void`**

Destroy, remove and kill all listeners from the dom tree.
