deleteToken()
Use the deleteToken()
API to delete a token and its corresponding data from the token vault. This API is overloaded to handle strings and string arrays.
Syntax
public void deleteToken(String token, String table) throws TokenException
public void deleteToken(String[] tokens, String table) throws TokenException
Request Parameters
Parameters | Data Types | Descriptions |
---|---|---|
token(s) | string or string[] | A token corresponds to an encrypted value, or an array of tokens. |
table | string | This is the Token Vault name and it must be in CAPITAL LETTERS. |
Exception
Throws TokenException
if the following parameters are invalid:
table
token
Example
deleteToken("5541997351273456", "CREDIT_CARD_NUMBERS")
In background, an SQL statement is created and executed, which deletes the 5541997351273456
token from the CREDIT_CARD_NUMBERS
table.
Tip
Use getTokensByDate() to delete a large number of tokens (over 10,000), which returns an array of up to 10,000 tokens. Pass this array through deleteToken(), and then loop through iterations of getTokensByDate() and deleteToken() until the required number of tokens are deleted.