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

# Error codes

These error codes are provided as parameters to the `errorCallback`s of [`tokenize`](https://documentation.ixopay.com/docs/reference/integration/payment.js/methods#tokenize) and [`refreshCvv`](https://documentation.ixopay.com/docs/reference/integration/payment.js/methods#refreshcvv).

The callbacks will receive an array of error codes, one for each detected error, for example:

```json
[
  { "attribute": "number", "key": "errors.blank", "message": "Card number must not be empty" },
  { "attribute": "cvv", "key": "errors.blank", "message": "CVV code must not be empty" }
]
```

## Card number

### Empty

```json
{
  "attribute": "number",
  "key": "errors.blank",
  "message": "Card number must not be empty"
}
```

### Invalid

```json
{
  "attribute": "number",
  "key": "errors.invalid",
  "message": "Invalid card number"
}
```

## CVV/CVC code

### Empty

```json
{
  "attribute": "cvv",
  "key": "errors.blank",
  "message": "CVV code must not be empty"
}
```

### Invalid

```json
{
  "attribute": "cvv",
  "key": "errors.invalid",
  "message": "Invalid CVV code"
}
```

## Expiration

### Expiration month empty

```json
{
  "attribute": "month",
  "key": "errors.blank",
  "message": "Expiration month must not be empty"
}
```

### Expiration month invalid

```json
{
  "attribute": "month",
  "key": "errors.invalid",
  "message": "Invalid expiration month"
}
```

### Expiration year empty

```json
{
  "attribute": "year",
  "key": "errors.blank",
  "message": "Expiration year must not be empty"
}
```

### Expiration year invalid

```json
{
  "attribute": "year",
  "key": "errors.invalid",
  "message": "Invalid expiration year"
}
```

### Card expired

```json
{
  "attribute": "year",
  "key": "errors.expired",
  "message": "Card expired"
}
```

## Card holder

### Card holder empty

```json
{
  "attribute": "card_holder",
  "key": "errors.blank",
  "message": "Card holder must not be empty"
}
```

### First name empty

```json
{
  "attribute": "first_name",
  "key": "errors.blank",
  "message": "First name must not be empty"
}
```

### Last name empty

```json
{
  "attribute": "last_name",
  "key": "errors.blank",
  "message": "Last name must not be empty"
}
```