Card Validation
Card validation in Stripe ensures that the card information provided is accurate and can be used for transactions. Below are the key steps and checks Stripe performs during card validation:
Key Validation Stepsβ
1. Basic Format Checksβ
- Card Number: Stripe checks the card number format using the Luhn algorithm.
- Expiration Date: Ensures the date is valid and not expired.
- CVC (Card Verification Code): Checks for correct length and format.
2. Card Brand Identificationβ
- Stripe identifies the card brand (Visa, Mastercard, etc.) based on the card number prefix (BIN/IIN).
3. Test Card Detectionβ
- Stripe automatically detects if a test card number is being used (useful for development and testing).
4. Zero-Value Authorizationβ
- Zero-Value Authorization is a process where a temporary authorization of $0 or $1 is placed on a card. This authorization does not result in an actual charge on the customerβs statement. It is used to verify the cardβs validity and detect issues such as expired cards or incorrect information, and can also support fraud prevention efforts.
5. Address Verification System (AVS)β
- When provided, Stripe can use the billing address to perform an AVS check, verifying the address with the card issuer.
6. Card Verification Code (CVC) Checkβ
- Stripe can verify the CVC provided with the card issuer for additional security.
7. 3D Secureβ
- For stronger authentication, Stripe supports 3D Secure verification when enabled, prompting the cardholder for additional authentication (e.g., SMS code, app approval).
tip
Not all checks are performed for every card or transaction. The specific validation steps may vary based on card type, issuer, and Stripe configuration.