Skip to main content

Card Verification
Enterprise

Card Verification is an Enterprise feature. Contact support@basistheory.com to request access.

Card Verification confirms that the cardholder details you hold match what the card issuer has on file, without running a payment. Two non-monetary checks are performed against the card networks:

  • Account Name Inquiry (ANI) compares the name you provide against the name on the issuer's account.
  • Address Verification Service (AVS) compares the billing address you provide against the address on the issuer's account.

Both checks run through a single request and return a normalized, network-agnostic result alongside the raw network response codes.

Verify Card​

POST
https://api.basistheory.com/enrichments/card-verify
Copy

Permissions​

enrichments:card-verify token:read

enrichments:card-verify is always required. token:read is additionally required when verifying a vaulted card with token_id — requests that pass raw card data need only enrichments:card-verify.

Request​

Verifying a card token
curl --location 'https://api.basistheory.com/enrichments/card-verify' \
--header 'BT-API-KEY: <API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"token_id": "c06d0789-0a5c-4b8b-b5d0-e2f4ca6d3241",
"owner": {
"name": {
"first": "Jane",
"middle": "Q",
"last": "Doe"
},
"address": {
"line1": "123 Main St",
"line2": "Apt 4",
"city": "San Francisco",
"state": "CA",
"postal_code": "94104",
"country": "US"
}
}
}'
Verifying a raw card
curl --location 'https://api.basistheory.com/enrichments/card-verify' \
--header 'BT-API-KEY: <API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"card": {
"number": "4242424242424242",
"expiration_month": 12,
"expiration_year": 2029
},
"owner": {
"name": {
"first": "Jane",
"last": "Doe"
}
}
}'

Request Parameters​

NameTypeDescription
token_idstring (Optional)The ID of the token containing the card to verify. Token type must be card. Mutually exclusive with card.
cardobject (Optional)The raw card to verify, in case it is not vaulted. Mutually exclusive with token_id.
ownerobjectThe cardholder details to verify against the issuer. At least one of owner.name or owner.address is required.

Exactly one of token_id or card must be provided. When token_id is used, the card number and expiration date are decrypted server-side and never leave the Basis Theory vault in your request or response.

Only card tokens can be verified by reference. The card networks require an expiration date for every inquiry, and a card_number token stores only the card number. To verify a card held as a card_number token, send the card number and its expiration date in the card object instead.

Card Object​

Required when verifying a card that is not referenced by a card token.

NameTypeDescription
numberstringThe card number.
expiration_monthintegerThe card's expiration month.
expiration_yearintegerThe card's four-digit expiration year.

Owner Object​

NameTypeDescription
nameobject (Optional)The cardholder name to verify. Providing this object runs the ANI check.
addressobject (Optional)The billing address to verify. Providing this object runs the AVS check.
The checks that run are implied by the data you send. Include owner.name to run ANI, include owner.address to run AVS, and include both to run both. There is no separate parameter to select checks, and a check cannot run without the data it compares against.

Name Object​

NameTypeDescription
firststring (Optional)The cardholder's first name.
middlestring (Optional)The cardholder's middle name or initial.
laststring (Optional)The cardholder's last name.
suffixstring (Optional)The cardholder's name suffix (e.g. Jr).
companystring (Optional)The company name, for business cards. Mutually exclusive with first, middle, last and suffix.

At minimum, first and last (or company for a business card) should be provided. Requests with less name detail return a less conclusive ANI result.

Address Object​

NameTypeDescription
line1string (Optional)The first line of the billing street address.
line2string (Optional)The second line of the billing street address.
citystring (Optional)The billing address city.
statestring (Optional)The billing address state, province or region.
postal_codestring (Optional)The billing address postal code.
countrystring (Optional)The two character ISO 3166-1 alpha-2 country code (e.g. US).

All address fields are individually optional, but AVS only produces a meaningful result when at least line1 or postal_code is provided.

Response​

Returns the normalized result of each check that was run.

{
"ani": {
"result": "match",
"name": {
"full": "match",
"first": "match",
"middle": "partial_match",
"last": "match"
}
},
"avs": {
"result": "partial_match",
"address_line": "no_match",
"postal_code": "match",
"network_code": "Z"
},
"network": "visa",
"par": "V0010013816180398433121885963",
"created_at": "2026-08-09T17:00:00.000Z"
}
NameTypeDescription
aniobjectThe Account Name Inquiry result. Omitted when owner.name was not provided.
avsobjectThe Address Verification result. Omitted when owner.address was not provided.
networkstringThe card network that answered the inquiry (e.g. visa, mastercard, discover).
parstringThe Payment Account Reference (PAR) returned by the network, a network-issued identifier that stays stable across all tokens and cards issued for the same underlying account.
created_atstringThe UTC timestamp when the verification was performed, in ISO 8601 format.

Results are not persisted by Basis Theory. Each response reflects the issuer's answer at the moment of the call and is not retrievable later — store any result you need to act on or audit.

ANI Object​

NameTypeDescription
resultstringThe overall name match result.
name.fullstringMatch result for the full name.
name.firststringMatch result for the first name.
name.middlestringMatch result for the middle name.
name.laststringMatch result for the last name.
Per-name-part results are only returned by networks that support them. Visa and Discover return first, middle and last; Mastercard returns full only. Fields the network did not return are omitted from the response — an absent field is not a failed match. Discover ANI coverage is limited, as there is no issuer mandate.

AVS Object​

NameTypeDescription
resultstringThe overall address match result.
address_linestringMatch result for the street address. Omitted when the network did not evaluate the address.
postal_codestringMatch result for the postal code. Omitted when the network did not evaluate the postal code.
network_codestringThe raw single-character AVS response code returned by the network. See AVS network codes.

ANI Results​

ValueDescription
matchThe name provided matches the name on the issuer's account.
partial_matchSome parts, but not all, of the name provided matches the name on the issuer's account.
no_matchThe name provided does not match the name on the issuer's account.
not_performedThe issuer did not perform the name check.
not_supportedThe issuer does not support Account Name Inquiry.

name.full, name.first, name.middle and name.last each return match, partial_match or no_match.

AVS Results​

ValueDescription
matchBoth the street address and the postal code match the issuer's records.
partial_matchEither the street address or the postal code matches, but not both.
no_matchNeither the street address nor the postal code matches.
unavailableThe issuer's AVS system was unavailable or did not return a result. Retry later.
not_supportedThe issuer or card type does not support AVS.
errorThe address data submitted could not be processed. Re-examine the address you provided.

AVS Network Codes​

avs.network_code is the raw code returned by the network, preserved so you can apply rules you may already run against AVS codes elsewhere. The table below shows how each code is normalized.

network_coderesultaddress_linepostal_code
Ymatchmatchmatch
Apartial_matchmatchno_match
Zpartial_matchno_matchmatch
Wpartial_matchno_matchmatch
Nno_matchno_matchno_match
Uunavailable——
Runavailable——
Munavailable——
Snot_supported——
Gnot_supported——
Inot_supported——
Eerror——

Error Handling​

Errors generated by the Basis Theory API follow the standard API Error formatting.

StatusDescription
400The request is invalid — neither token_id nor card was provided, both were provided, neither owner.name nor owner.address was provided, or a field is malformed.
401The request is missing valid authentication credentials.
403The Application lacks the enrichments:card-verify permission, lacks token:read for a token_id request, or Card Verification is not enabled for your tenant.
404The token referenced by token_id does not exist or is not accessible under the Application's access controls.
422The token referenced by token_id is not a card token, or its card data is incomplete (for example, a missing expiration date).
424The verification could not be completed because the upstream verification service returned an error or was unreachable. No check result is returned — retry the request.
Verification is all-or-nothing. If either requested check fails upstream, the request fails with a 424 rather than returning a partial result.