> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.runpayments.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.runpayments.io/_mcp/server.

# Tokenize

## What is Runner.js?

Runner.js is a browser-side JavaScript library used to tokenize and send sensitive payment information directly from a user’s browser, keeping your customers' data secure and your software fully PCI-compliant. A single integration to Runner.js can be used to handle tokenization for all supported Payments API products in Run Developer.

> **Tip**
>
> If you’d like to tokenize a payment account without integrating to Runner.js, log in to your Run Merchant test account and navigate to the **Developer** menu where you will find a card tokenizer for your merchant account. Please reach out to your Integration Delivery lead if you require assistance.

### Requirements:

Before you can tokenize an account using Runner.js, you must have:

* **`public_key`** generated in Run Merchant or provided by your Integration Delivery Lead.

## Usage

1. Add the Runner.js script to your page by adding the tag to the `header` of your HTML file. `version` number is required as indicated in the slug below. Use `latest` for the most recent release.

```jsx
<script src=”https://javelin.runpayments.io/javascripts/<version>/runner.js”></script>
```

For example, if you are using version 1.1.4:

```jsx
<script src=”https://javelin.runpayments.io/javascripts/1.1.4/runner.js”></script>
```

Or you can use the `latest` value for `version` to always use the latest release:

```jsx
<script src=”https://javelin.runpayments.io/javascripts/latest/runner.js”></script>
```

> **Note**
>
> As of 8/11/2025, the latest Runner.js version is **1.4.2**. For more details, visit [Runner.js Versions](/docs/guides/tokenization/versions).

2. Initialize Runner.js using your `public_key`.

#### Card

```jsx
var runner = new Runner();
  runner.init({
    element: '#run-form',
    publicKey: '<YOUR KEY>',
    css: 'input%7Bwidth%3A200px%3B%7D',
    tokenizeAutomatically: true,
    inactivityto: 200,
    useExpiry: true,
    useCvv: true,
    cardLabel: 'Your Test Card Label',
    cvvLabel: 'Your Test CVV Label',
    expiryLabel: 'Your Test Expiry Label'
  });
```

#### ACH

```jsx
var runner = new Runner();
  runner.init({
    element: '#run-form',
    publicKey: '<YOUR KEY>',
    css: 'input%7Bwidth%3A200px%3B%7D',
    tokenizeAutomatically: true,
    inactivityto: 200,
    accountNumberLabel: 'Your Acct # Label',
    repeatedAccountNumberLabel: 'Your Repeated Acct # Label',
    routingNumberLabel: 'Your Routing # Label',
    accountTypeLabel: 'Your Account Type Label',
    customerNameLabel: 'Your Customer Name Label',
    entryClassCodeLabel: 'Your Entry Class Code Label'
  });
```

> **Note**
>
> For details on the parameters that can be passed, refer to the [Runner.js](/docs/guides/tokenization/runner-js) page.

3. (Optional) Subscribe to iframe loaded event:

```jsx
runner.onLoaded(function() {
      console.log('loaded');
  });
```

4. Call the `tokenize` method to generate tokenized account information that has been entered into the Runner.js field. The resulting value may then be passed to the Payment API to enact payment processing activities. (Note: This action can be completed during form submission, if preferred.)

```jsx
runner.tokenize(res);
```

The function within the `tokenize` call will return the following data:

| Parameter     | Description                                                                                                                     |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| account_token | The payment account token returned from the iFrame                                                                              |
| expiry        | Expiration date (Tokenized card only)                                                                                           |
| card_info     | Card brand information (Tokenized card only)                                                                                    |
| bank_info     | Institution name (Tokenized ACH only)                                                                                           |
| risk_info     | Bank account Risk Score (Tokenized ACH only. Please inquire with your Integration Lead if you would like to receive this data.) |

> **Note**
>
> For examples of how to implement Runner.js, check out the [Runner.js](/docs/guides/tokenization/runner-js#examples) page.