> 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/options.md).

# Options

## **key `string`** **`required`**

Merchant public key.

## **host `string`** **`required`**

Checkout server baseUrl.

## **type `string`** **`optional`**

Whether you to create a bank account or card token.

Only accepts `bank_account` or `card` values. Set to `card` by default.

## **theme `string`** **`optional`**

Specify the preferred ui appearance for the **Checkout** form.

Supported themes are `light` and `dark`.

Set to `light` by default.

## **locale `string`** **`optional`**

Specify the preferred language for the **Checkout** form.

Supported languages are `en` and `es`.

Set to current locale system from user web browser by default if is supported, otherwise fallback to `en`.

## **defaultCountry `string`** **`optional`**

Default value for country field id **allowBilling** is `true`. Set to `US` by default.

## **defaultCurrency `string`** **`optional`**

Default value for currency field if **allowCurrency** is `true`. Set to `USD` by default.

## **allowBilling `string`** **`optional`**

Whether to allow or not billing information. Set to `true` by default.

## **allowCurrency `string`** **`optional`**

Whether to allow or not currency field. Set to `true` by default.

## **onLoaded `function`** **`optional`**

Callback triggered when checkout is fully and successfully loaded.

## **onCreated(token `object`) `function`** **`optional`**

Callback triggered when checkout has successfully created a token.

## **onCanceled `function`** **`optional`**

Callback triggered when checkout is canceled by user.

## **onError(error `object`) `function`** **`optional`**

Callback triggered when checkout throws an error.

{% tabs %}
{% tab title="JS" %}

```javascript
var checkout = new Checkout(
    host: "https://checkout3.gpnpay.com",
    key: "pk_test_qhDUMhE0-lzH4PtK0nDvPQ",
    type: "card",
    theme: "dark",
    locale: "es",
    allowBilling: true,
    allowCurrency: true,
    defaultCountry: "US", // United States
    defaultCurrency: "USD", // United States Dollar

    onLoaded: function () {
        // checkout loaded.
    },

    onCreated: function (token) {
        // token created.
    },

    onCanceled: function () {
        // user canceled
    },

    onError: function (error) {
        // error has occurred
    },
);
```

{% endtab %}

{% tab title="DART" %}

```dart
final checkout =  Checkout(
    host: 'https://checkout3.gpnpay.com',
    key: 'pk_test_qhDUMhE0-lzH4PtK0nDvPQ',
    type: TokenType.card,
    theme: 'dark',
    locale: 'es',
    allowBilling: true,
    allowCurrency: true,
    defaultCountry: 'US', // United States
    defaultCurrency: 'USD', // United States Dollar

    onLoaded: () {
        // checkout loaded.
    },

    onCreated: (PaymentToken token) {
        // token created.
    },

    onCanceled: () {
        // user canceled
    },

    onError: (Object error) {
        // error has occurred
    },
);
```

{% endtab %}

{% tab title="ANGULAR" %}

```
<checkout
    host="https://checkout3.gpnpay.com"
    key="pk_test_qhDUMhE0-lzH4PtK0nDvPQ"
    [type]="TokenType.card",
    theme="dark",
    locale="es",
    defaultCountry="US"
    defaultCurrency="USD"
    allowBilling
    allowCurrency
    (loaded)="handleLoad()"
    (created)="handleCreate($event)"
    (canceled)="handleCanceled()"
    (error)="handleError($event)"
></checkout>
```

{% endtab %}
{% endtabs %}
