# Token Response

The response object passed to `onSubmit` [callback](/js/callbacks) or `form.submit()` [method](/js/form-instance) on successful tokenization. Access the token via `response.data`.

Tokens expire **30 minutes** after creation and should be used immediately to create a Payment Instrument.

## Card Token

On success, `response.data` contains:


```json
{
  "id": "TKeD6uad8xZc52Rqg1VhvSBw",
  "created_at": "2025-06-10T00:31:53.54Z",
  "updated_at": "2025-06-10T00:31:53.54Z",
  "currency": "USD",
  "expires_at": "2025-06-11T00:31:53.54Z",
  "fingerprint": "FPRrcobjtdU98gr4sjiqYR1Qg",
  "instrument_type": "PAYMENT_CARD"
}
```

| Field | Description |
|  --- | --- |
| `id` | Token ID (prefixed `TK`) — use this to create a Payment Instrument |
| `currency` | `USD` for most countries; `CAD` for Canadian bank accounts |
| `expires_at` | Token expires 30 minutes after creation |
| `fingerprint` | Unique fingerprint for the payment instrument (prefixed `FP`) |
| `instrument_type` | `PAYMENT_CARD` or `BANK_ACCOUNT` |


Pass `tokenData.id` to your backend, then use it to create a Payment Instrument via the Finix API.

## Bank Account Token

Bank account tokens have the same shape as card tokens, with `instrument_type: "BANK_ACCOUNT"`.

Use `instrument_type` to implement different workflows depending on whether the buyer submitted a card or bank account.

## Error Response

When tokenization fails, `error` is non-null and `response` is `null`.

| Parameter | Type | Description |
|  --- | --- | --- |
| `error` | `object` | Error details if submission failed |
| `response` | `null` | Always `null` when error is present |