# Create ACH token

Creating an ACH token validates the account number or routing number for transaction.

To create an ACH token:&#x20;

{% stepper %}
{% step %}
Use the POST method with the `/rest/v2/ach/tokens` endpoint and the following sample request:

{% code lineNumbers="true" %}

```json
{ 
    "account-number": "123456789", 
    "account-type": "Checking", 
    "individual-name": "John Doe", 
    "routing-number": "081009813", 
    "software-type": "MySoftware", 
    "software-type-version": "v1.0", 
    "token-description": "Business checking account" 
}
```

{% endcode %}

The following table describes the request body parameters:

<table><thead><tr><th width="133" valign="top">Name</th><th width="111" valign="top">Data type</th><th width="130.66668701171875" valign="top">Required?</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>account-number</code></td><td valign="top">String</td><td valign="top">Optional</td><td valign="top">The bank account number used for the ACH transaction.</td></tr><tr><td valign="top"><code>account-type</code></td><td valign="top">String</td><td valign="top">Optional</td><td valign="top">The type of bank account. For example, Checking or Savings.</td></tr><tr><td valign="top"><code>individual-name</code></td><td valign="top">String</td><td valign="top">Optional</td><td valign="top">The name of the individual associated with the bank account.</td></tr><tr><td valign="top"><code>routing-number</code></td><td valign="top">String</td><td valign="top">Optional</td><td valign="top">The bank routing number used to identify the financial institution.</td></tr><tr><td valign="top"><code>software-type</code></td><td valign="top">String</td><td valign="top">Optional</td><td valign="top">The name of the software initiating the request.</td></tr><tr><td valign="top"><code>software-type-version</code></td><td valign="top">String</td><td valign="top">Optional</td><td valign="top">The version of the software used to initiate the request.</td></tr><tr><td valign="top"><code>token-description</code></td><td valign="top">String</td><td valign="top">Optional</td><td valign="top">A description of the token being created, such as the account purpose.</td></tr></tbody></table>
{% endstep %}

{% step %}
Set `create-token` to `true` in the transaction payload to generate and store a token for future use, for example:

{% code lineNumbers="true" %}

```bison
{
    type:credit
    amount:2.00
    account-number: 323434333
    routing-number: 333333333
    create-token: true
  }
```

{% endcode %}
{% endstep %}
{% endstepper %}

The `ach-token` returns the following response:

{% code lineNumbers="true" %}

```json
{ 
  "ach-token": 
              {
              "account-number": "1111", 
              "account-type": "Checking", 
              "created": "1100000000000000", 
              "individual-name": "John Doe", 
              "last-used": "1100000000000000", 
              "merchant-id": "000008888", 
              "routing-number": "081009813", 
              "times-used": 14, 
              "token-description": "Travel checking account", 
              "token-id": "1100000000000000", 
              "updated": "1100000000000000" 
              }, 
              "payloadType": "string" 
}
```

{% endcode %}

The following table describes the response body fields:

<table><thead><tr><th width="152.33331298828125" valign="top">Name</th><th width="116" valign="top">Data type</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>account-number</code></td><td valign="top">String</td><td valign="top">The bank account number.</td></tr><tr><td valign="top"><code>account-type</code></td><td valign="top">String</td><td valign="top">The type of bank account.</td></tr><tr><td valign="top"><code>created</code></td><td valign="top">String</td><td valign="top">The timestamp when the token was created.</td></tr><tr><td valign="top"><code>individual-name</code></td><td valign="top">String</td><td valign="top">The name of the individual associated with the token.</td></tr><tr><td valign="top"><code>last-used</code></td><td valign="top">String</td><td valign="top">The timestamp when the token was last used.</td></tr><tr><td valign="top"><code>merchant-id</code></td><td valign="top">String</td><td valign="top">The unique identifier of the merchant associated with the token.</td></tr><tr><td valign="top"><code>routing-number</code></td><td valign="top">String</td><td valign="top">The bank routing number associated with the account.</td></tr><tr><td valign="top"><code>times-used</code></td><td valign="top">String</td><td valign="top">The number of times the token has been used.</td></tr><tr><td valign="top"><code>token-description</code></td><td valign="top">String</td><td valign="top">A description of the token, such as the account’s purpose.</td></tr><tr><td valign="top"><code>token-id</code></td><td valign="top">String</td><td valign="top">The unique identifier of the token.</td></tr><tr><td valign="top"><code>updated</code></td><td valign="top">String</td><td valign="top">The timestamp when the token was last updated.</td></tr><tr><td valign="top"><code>payloadType</code></td><td valign="top">String</td><td valign="top">The type of payload returned in the response.</td></tr></tbody></table>

The `ach-token` returns the following status and error codes:

<table><thead><tr><th width="120.00006103515625">Code</th><th>Description</th></tr></thead><tbody><tr><td>401</td><td>If the ACH token has expired or the signature does not match the token.</td></tr><tr><td>500</td><td>If the request is invalid—for example, if the routing number contains letters.</td></tr><tr><td>200</td><td>An ACH token created successfully.</td></tr></tbody></table>
