Error codes
These error codes are provided as parameters to the errorCallbacks of tokenize and
refreshCvv.
The callbacks will receive an array of error codes, one for each detected error, for example:
[
{ "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β
{
"attribute": "number",
"key": "errors.blank",
"message": "Card number must not be empty"
}
Invalidβ
{
"attribute": "number",
"key": "errors.invalid",
"message": "Invalid card number"
}
CVV/CVC codeβ
Emptyβ
{
"attribute": "cvv",
"key": "errors.blank",
"message": "CVV code must not be empty"
}
Invalidβ
{
"attribute": "cvv",
"key": "errors.invalid",
"message": "Invalid CVV code"
}
Expirationβ
Expiration month emptyβ
{
"attribute": "month",
"key": "errors.blank",
"message": "Expiration month must not be empty"
}
Expiration month invalidβ
{
"attribute": "month",
"key": "errors.invalid",
"message": "Invalid expiration month"
}
Expiration year emptyβ
{
"attribute": "year",
"key": "errors.blank",
"message": "Expiration year must not be empty"
}
Expiration year invalidβ
{
"attribute": "year",
"key": "errors.invalid",
"message": "Invalid expiration year"
}
Card expiredβ
{
"attribute": "year",
"key": "errors.expired",
"message": "Card expired"
}
Card holderβ
Card holder emptyβ
{
"attribute": "card_holder",
"key": "errors.blank",
"message": "Card holder must not be empty"
}
First name emptyβ
{
"attribute": "first_name",
"key": "errors.blank",
"message": "First name must not be empty"
}
Last name emptyβ
{
"attribute": "last_name",
"key": "errors.blank",
"message": "Last name must not be empty"
}