# Verify a card You can perform a card verification to verify a cardholder's payment details without charging them. 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 can collect card details during registration, and then offer a free 30-day trial period before charging the card. The cardholder's details are saved to their account, which you can charge when necessary. --- ## Request a card verification To verify a card, call the [Request a payment or payout](https://api-reference.checkout.com/tag/Payments/#operation/requestAPaymentOrPayout) endpoint. In the request body, set the `amount` field to `0`, or omit it. > **Information** > > Your base URL's `{prefix}` value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see [API endpoints](https://www.checkout.com/docs/developer-resources/api/api-endpoints.md). **Production** `POST` `https://{prefix}.api.checkout.com/payments` **Sandbox** `POST` `https://{prefix}.api.sandbox.checkout.com/payments` ### Request example ```json { "source": { "type": "token", "token": "tok_yo2zfqgdnn4u7gswjbjmqt5mza" }, "currency": "USD" } ``` ### Response example ```json { "id": "pay_aqwuar5sjb5upkupgywyzapfii", "action_id": "act_aqwuar5sjb5upkupgywyzapfii", "amount": 0, "currency": "USD", "approved": true, "status": "Card Verified", "auth_code": "085143", "eci": "05", "scheme_id": "638284745624527", "response_code": "10000", "response_summary": "Approved", "risk": { "flagged": false }, "source": { "id": "src_o67xgoxulgnuhgeaxsdk4cbvgq", "type": "card", "expiry_month": 9, "expiry_year": 2022, "scheme": "Visa", "last4": "4242", "fingerprint": "F31828E2BDABAE63EB694903825CDD36041CC6ED461440B81415895855502832", "bin": "424242", "card_type": "CREDIT", "card_category": "CONSUMER", "issuer": "Test Bank", "issuer_country": "US", "product_id": "A", "product_type": "Visa Traditional", "avs_check": "S", "cvv_check": "" }, "customer": { "id": "cus_vrdaroxvawlevmxxvhi66thpum" }, "processed_on": "2024-01-17T17:41:52Z", "_links": { "self": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_aqwuar5sjb5upkupgywyzapfii" }, "actions": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_aqwuar5sjb5upkupgywyzapfii/actions" } } } ``` If the card verification is successful, the response returns: - `"approved": true` - `"status": "Card Verified"` If you receive a `202` response, a redirect is required. For example, for 3D Secure (3DS) authentication. You can also view the results in the [Card verified](https://www.checkout.com/docs/developer-resources/event-notifications/event-types/card_verified.md) webhook. For more information on the value returned in the `source.cvv_check` field, see [CVV response codes](https://www.checkout.com/docs/developer-resources/testing/codes/cvv-response-codes.md). ### Failed verifications If the verification fails, it may be for the following reasons: - The card may be invalid, expired, or have insufficient funds. - The issuer may not support card verification. They may reject the charge request even if the card details are valid. - The issuer may not support zero-amount authorizations. If the issuer does not support zero-amount authorizations, try the following: - Manually retry the verification with the `amount` field set to a low nominal value, and then void the payment. - Enable [Intelligent Acceptance](https://www.checkout.com/docs/payments/optimize-payments/boost-acceptance-rates.md) to automatically retry these payments through any other possible methods. Intelligent Acceptance does not retry non-zero amounts. ### Test card verifications To test your card verification integration, see [Simulate card verification outcomes](https://www.checkout.com/docs/developer-resources/testing/simulate-card-verification-outcomes.md). --- ## Request an Account Name Inquiry To reduce fraud risk, you can validate a cardholder's name against the name held by their issuing bank using an 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 can return the following: - A match result for each name you provided - An overall match result for the whole name ANI checks are available for Visa and Mastercard, subject to issuer support. You can also request ANI checks for payments made with Apple Pay and Google Pay. To request an ANI, call the [Request a payment or payout](https://api-reference.checkout.com/tag/Payments/#operation/requestAPaymentOrPayout) endpoint. Set the `amount` field to `0`. In the `account_holder` object, provide the following: - `type` – Set to one of `individual`, `corporate`, or `government`. - `first_name`, `middle_name`, and `last_name` – Provide if the account holder is an individual. - `company_name` – Provide if the account holder is a corporate or government entity. - `account_name_inquiry` – Set to `true`. > **Information** > > Your base URL's `{prefix}` value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see [API endpoints](https://www.checkout.com/docs/developer-resources/api/api-endpoints.md). **Production** `POST` `https://{prefix}.api.checkout.com/payments` **Sandbox** `POST` `https://{prefix}.api.sandbox.checkout.com/payments` ### Request example ```json { "source": { "type": "token", "token": "tok_yo2zfqgdnn4u7gswjbjmqt5mza", "account_holder": { "type": "individual", "first_name": "John", "middle_name": "Joe", "last_name": "Doe", "account_name_inquiry": true } }, "amount": 0, "currency": "USD" } ``` ### Response example ```json { "id": "pay_aqwuar5sjb5upkupgywyzapfii", "action_id": "act_aqwuar5sjb5upkupgywyzapfii", "amount": 0, "currency": "USD", "approved": true, "status": "Card Verified", "auth_code": "085143", "eci": "05", "scheme_id": "638284745624527", "response_code": "10000", "response_summary": "Approved", "risk": { "flagged": false }, "source": { "id": "src_o67xgoxulgnuhgeaxsdk4cbvgq", "type": "card", "expiry_month": 9, "expiry_year": 2022, "scheme": "Visa", "last4": "4242", "fingerprint": "F31828E2BDABAE63EB694903825CDD36041CC6ED461440B81415895855502832", "bin": "424242", "account_holder": { "account_name_inquiry": "full_match", "account_name_inquiry_details": { "first_name": "full_match", "middle_name": "full_match", "last_name": "full_match" } }, "card_type": "CREDIT", "card_category": "CONSUMER", "issuer": "Test Bank", "issuer_country": "US", "product_id": "A", "product_type": "Visa Traditional", "avs_check": "S", "cvv_check": "" }, "customer": { "id": "cus_vrdaroxvawlevmxxvhi66thpum" }, "processed_on": "2024-01-17T17:41:52Z", "_links": { "self": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_aqwuar5sjb5upkupgywyzapfii" }, "actions": { "href": "https://{prefix}.api.sandbox.checkout.com/payments/pay_aqwuar5sjb5upkupgywyzapfii/actions" } } } ``` The response returns the result of the ANI check as an [ANI code](https://www.checkout.com/docs/developer-resources/codes/ani-codes.md) in the `account_holder.account_name_inquiry` field. If you request an ANI check from Visa, you can inspect the `account_name_inquiry_details` object for a more detailed breakdown of the matches. For example, you can get an `account_name_inquiry": "partial_match"` result, if: `account_name_inquiry_details.first_name` and `account_name_inquiry_details.last_name` result in a `full_match` but `account_name_inquiry_details.middle_name` is `no_match` You can use this detailed information to better determine whether you verify the transaction or not. ### Test Account Name Inquiries To simulate different outcomes, see [ANI check testing](https://www.checkout.com/docs/developer-resources/testing/ani-check-testing.md).