Verify a card
Last updated: November 6, 2024
You can perform a card verification to verify a cardholder's payment information without charging the customer.
For example, you can use this type of authorization request if you offer a free trial period for a product or service.
For example, you may choose to collect credit card information during an initial registration process but offer a 30-day trial period before charging the customer's credit card. The cardholder's details are saved to their account, allowing you to charge the card when necessary.
To verify a card, set up a payment request with the amount
field omitted or set to 0
.
post
https://api.checkout.com/payments
For the full specification, as well as complete request and response examples, see our API Reference
1{2"source": {3"type": "token",4"token": "tok_yo2zfqgdnn4u7gswjbjmqt5mza"5},6"currency": "USD"7}
1{2"id": "pay_aqwuar5sjb5upkupgywyzapfii",3"action_id": "act_aqwuar5sjb5upkupgywyzapfii",4"amount": 0,5"currency": "USD",6"approved": true,7"status": "Card Verified",8"auth_code": "085143",9"eci": "05",10"scheme_id": "638284745624527",11"response_code": "10000",12"response_summary": "Approved",13"risk": {14"flagged": false15},16"source": {17"id": "src_o67xgoxulgnuhgeaxsdk4cbvgq",18"type": "card",19"expiry_month": 9,20"expiry_year": 2022,21"scheme": "Visa",22"last4": "4242",23"fingerprint": "F31828E2BDABAE63EB694903825CDD36041CC6ED461440B81415895855502832",24"bin": "424242",25"card_type": "CREDIT",26"card_category": "CONSUMER",27"issuer": "Test Bank",28"issuer_country": "US",29"product_id": "A",30"product_type": "Visa Traditional",31"avs_check": "S",32"cvv_check": ""33},34"customer": {35"id": "cus_vrdaroxvawlevmxxvhi66thpum"36},37"processed_on": "2019-01-17T17:41:52Z",38"_links": {39"self": {40"href": "https://api.sandbox.checkout.com/payments/pay_aqwuar5sjb5upkupgywyzapfii"41},42"actions": {43"href": "https://api.sandbox.checkout.com/payments/pay_aqwuar5sjb5upkupgywyzapfii/actions"44}45}46}
If the response contains an approved
field set to true
and a status
field set to Card Verified
, the verification was successful.
If the card verification was unsuccessful, the card may be invalid, expired, or have insufficient available balance on the account.
Not all issuing banks support card verification. They may reject the charge request even if the card details are valid.
Additionally, some issuers might not support zero-amount authorizations. In these cases, you can:
- Manually retry the verification with the
amount
field set to a low nominal value, and then void the payment. - Enable Intelligent Acceptance to automatically retry these payments.
If you receive a 202
response, a redirect is required. For example, if 3D Secure (3DS) authentication is required.
For more information on the value returned in the source.cvv_check
field, see the CVV response codes page.
You can also review the results in the card_verified webhook.
You can simulate card verification outcomes to test your integration.
To reduce the risk of fraud, you can validate a cardholder's name against the name held by their issuing bank using Account Name Inquiry (ANI). ANI is a card verification service that works independently of the financial transaction.
When you request an ANI check, the system returns a match result for each name you provided, or an overall match result for the complete name.
ANI checks are available for Visa and issuers in the following countries:
- United States
- Canada
- United Kingdom
To request an ANI check, include the account_holder
object in your card verification request:
type
set to one ofindividual
,corporate
, orgovernment
first_name
andlast_name
, if the account holder is an individualcompany_name
, if the account holder is a corporate or government entityaccount_name_inquiry
set totrue
post
https://api.checkout.com/payments
1{2"source": {3"type": "token",4"token": "tok_yo2zfqgdnn4u7gswjbjmqt5mza",5"account_holder": {6"type": "individual",7"first_name": "Ali",8"last_name": "Farid",9"account_name_inquiry": true10}11},12"amount": 0,13"currency": "USD"14}
1{2"id": "pay_aqwuar5sjb5upkupgywyzapfii",3"action_id": "act_aqwuar5sjb5upkupgywyzapfii",4"amount": 0,5"currency": "USD",6"approved": true,7"status": "Card Verified",8"auth_code": "085143",9"eci": "05",10"scheme_id": "638284745624527",11"response_code": "10000",12"response_summary": "Approved",13"risk": {14"flagged": false15},16"source": {17"id": "src_o67xgoxulgnuhgeaxsdk4cbvgq",18"type": "card",19"expiry_month": 9,20"expiry_year": 2022,21"scheme": "Visa",22"last4": "4242",23"fingerprint": "F31828E2BDABAE63EB694903825CDD36041CC6ED461440B81415895855502832",24"bin": "424242",25"account_holder": {26"account_name_inquiry": "full_match"27},28"card_type": "CREDIT",29"card_category": "CONSUMER",30"issuer": "Test Bank",31"issuer_country": "US",32"product_id": "A",33"product_type": "Visa Traditional",34"avs_check": "S",35"cvv_check": ""36},37"customer": {38"id": "cus_vrdaroxvawlevmxxvhi66thpum"39},40"processed_on": "2019-01-17T17:41:52Z",41"_links": {42"self": {43"href": "https://api.sandbox.checkout.com/payments/pay_aqwuar5sjb5upkupgywyzapfii"44},45"actions": {46"href": "https://api.sandbox.checkout.com/payments/pay_aqwuar5sjb5upkupgywyzapfii/actions"47}48}49}
You receive the result of ANI checks as an ANI code in the account_holder.account_name_inquiry
field in the response.
You can simulate different outcomes using ANI check testing.