Create a 4 Digit CVV Code for American Express Cards and Accept Leading Zeroes 


In this Article
Related Articles

Create a 4 Digit CVV Code for American Express Cards and Accept Leading Zeroes

If you plan on accepting American Express cards, your respondents will need to enter a 4 digit CVV code as opposed to the typical 3 digit CVV code used by other credit card companies. One way to handle this would be to use the following strategy:

  1. Create a CVV with a 3 digit placeholder and 3 character validation
  2. Create a CVV with a 4 digit placeholder and 4 character validation
  3. Conditionally show one or the other based on the card type selected (4-digit for Amex and 3-digit for all others)
  4. Create a hidden calculated field called CVV and use a javascript formula to show one or the other AmexCVV==""?('000'+StandardCVV).substr(-3):('0000'+AmexCVV).substr(-4)
    • This is the field you would use in your connector mapping for the CVV code. You would also need to mark both of your CVV fields as variables and use the names from the above formula (i.e. StandardCVV and AmexCVV).
    • This formula will also account for leading zeros in CVV codes, so they will not be stripped with the code is sent to the payment processor.

Video Tutorial

Note: The video above uses an old version of the formula which does not account for leading zeroes in CVV codes. We recommend using the formula shown above on this page in order to account for CVV codes that contain leading zeroes.
Terms of Service · Privacy Policy