creditcard grammar

Collects a credit card number.

Optionally, callers can preceding the number with the credit card name, or the words "account number" or "account." For example, a caller can say, "visa account number four oh one seven…," "mastercard five zero zero two…," or "three seven three five…."

The grammar is capable of understanding any commercial credit card adhering to the ISO standard numbering scheme. This scheme covers cards issued by Visa, MasterCard, American Express, Discover, and Diners Club, as well as many "private label" cards provided by individual retailers (department stores, gas companies, etc.). This standard dictates minimum and maximum length of the digit string, open digit sequences, and the use of a "check digit" as the last digit in the string, so that the entire number meets the "mod 10 checksum" criterion.

Because of the number of digits in a credit card number and the short duration of audio information for each digit, the collection of credit card numbers is a difficult task for speech recognition engines. In addition, there are security issues to consider: because the format of credit card numbers and their validation algorithms are available to the general public, thieves are able to provide valid numbers for illegal purposes. For these reasons, Nuance strongly recommends that you cross-validate numbers with related information.

For example:

  • Expiration date: Ensure that the credit card number and the expiration date are compatible.
  • Security codes: Ensure that the credit card number is compatible with the three-digit number on the back of the card. (Security codes are not available on all cards.)
  • Database validation: Use a database to match the credit card number to a specific customer.

Return keys/values

Key

Value

MEANING

Contains the credit card number recognized.

SWI_literal

Contains the exact text that was recognized.

CARDTYPE

Contains the type recognized, where the types are of the same set that can be specified in typesallowed. If the caller does not specify the card type explicitly, the type is inferred from the card number. For example, if the caller says a number starting with "4," the value of CARDTYPE is set to "visa" even if "visa" is not spoken explicitly

Properties

Property

Description

typesallowed

The credit card types to be recognized. To specify more than one, use %2B (the escape sequence for the plus sign) to separate each type.

Set includes amex, dinersclub, discover, mastercard, private, visa. By default, all types are recognized.

Note: Ineligible types do not result in a runtime error.

DTMF interpretation

The entered number is returned in MEANING. The card type is inferred from the number and returned in CARDTYPE.

Example

builtin:grammar/creditcard?language=en-US;
   typesallowed=mastercard%2Bvisa