Token Types
Basis Theory offers several pre-configured token types for various use-cases and compliance requirements. Token Types define the rules around a data type such as validation requirements, default token containers, fingerprint expressions, and mask expressions.
When creating a token without a fingerprint_expression
, the
fingerprint_tokens
tenant setting must be set to true
to automatically apply the Default Fingerprint Expression associated with the token type.
See our docs on Fingerprints for details.
Token
The token
type is used for general data types that don't require input validation or formatting restrictions.
Token Attribute | Value |
---|---|
Type | token |
Default Container | /general/high/ |
Input Validation | None |
Input Length | Any |
Default Fingerprint Expression | {{ data | stringify }} |
Default Mask Expression | null |
Default Search Indexes | None |
Card
Token Attribute | Value |
---|---|
Type | card |
Default Container | /pci/high/ |
Input Validation | See Card Object for validation requirements |
Default Fingerprint Expression | {{ data.number }} |
Default Mask Expression | { |
Default Search Indexes | None |
See Test Card Numbers for suggested test data when using card
tokens.
The cvc
property within the Card Object automatically expires and is deleted based on your CVC Retention Quota, with a default of one hour in order to comply with PCI requirements.
cvc
for longer than the default "CVC Retention" Quota of one hour, it may be possible to extend the expiration time while maintaining PCI compliance. Please request a change to the CVC Retention Quota in the Quota Page for your Tenant.Bank
Token Attribute | Value |
---|---|
Type | bank |
Default Container | /bank/high/ |
Input Validation | See Bank Object for validation requirements |
Default Fingerprint Expression | {{ data.account_number }}|{{ data.routing_number }} |
Default Mask Expression | { |
Default Search Indexes | None |
Card Number
Token Attribute | Value |
---|---|
Type | card_number |
Default Container | /pci/high/ |
Input Validation | Luhn-valid, numeric |
Input Length | 13 - 19 |
Default Fingerprint Expression | {{ data }} |
Default Mask Expression | {{ data | reveal_last: 4 }} |
Default Search Indexes | None |
See Test Card Numbers for suggested test data when using card_number
tokens.
Examples:
Input Data | Masked Value |
---|---|
4242424242424242 | XXXXXXXXXXXX4242 |
36227206271667 | XXXXXXXXXX1667 |
US Bank Account Number
Token Attribute | Value |
---|---|
Type | us_bank_account_number |
Default Container | /bank/high/ |
Input Validation | Numeric |
Input Length | 3 - 17 |
Default Fingerprint Expression | {{ data }} |
Default Mask Expression | {{ data | reveal_last: 4 }} |
Default Search Indexes | None |
Examples:
Input Data | Masked Value |
---|---|
1234567890 | XXXXXX7890 |
US Bank Routing Number
Token Attribute | Value |
---|---|
Type | us_bank_routing_number |
Default Container | /bank/low/ |
Input Validation | Numeric, ABA-valid |
Input Length | 9 |
Default Fingerprint Expression | {{ data }} |
Default Mask Expression | {{ data | reveal_last: 4 }} |
Default Search Indexes | None |
Social Security Number
Token Attribute | Value |
---|---|
Type | social_security_number |
Default Container | /pii/high/ |
Input Validation | Numeric with optional delimiter of "-" |
Input Length | 9 (not including delimiting characters) |
Default Fingerprint Expression | {{ data | remove: '-' }} |
Default Mask Expression | {{ data | reveal_last: 4 }} |
Default Search Indexes | {{ data }} {{ data | replace: '-' }} {{ data | last4 }} |
Examples:
Input Data | Masked Value |
---|---|
123456789 | XXXXX6789 |
123-45-6789 | XXX-XX-6789 |
Employer ID Number
Token Attribute | Value |
---|---|
Type | employer_id_number |
Default Container | /pii/high/ |
Input Validation | Numeric with optional delimiter of "-" |
Input Length | 9 (not including delimiting characters) |
Default Fingerprint Expression | {{ data | remove: '-' }} |
Default Mask Expression | {{ data | reveal_last: 4 }} |
Default Search Indexes | {{ data }} {{ data | replace: '-' }} {{ data | last4 }} |
Examples:
Input Data | Masked Value |
---|---|
123456789 | XXXXX6789 |
12-3456789 | XX-XXX6789 |