deleteValue()
deleteValue() API deletes tokens corresponding to the input value(s) from the token vault. This method is overloaded to handle strings and string arrays, and to account for the optional customData parameter.
Syntax
public void deleteValue (String value, String table) throws TokenException
public void deleteValue (String value, String customData, String table) throws TokenException
public void deleteValue (String[] values, String table) throws TokenException
public void deleteValue (String[] values, String[] customData, String table) throws TokenException
Request Parameters
Parameters | Data Types | Descriptions |
---|---|---|
value | string or string[] | A plaintext value that has been tokenized, or an array of such values. |
customData | string or string[] | Customer-specific data |
table | string | This is the Token Vault name and it must be in CAPITAL LETTERS |
Note
For My SQL, If the customData parameter is null or empty, then the deleteValue() API deletes records based on values in the vault.
Exception
Throws TokenException
if:
A table is missing or the value is null or invalid.
The value and customData arrays do not have the same number of elements.
A customData element is too long.
Example
deleteValue("1234567890123456", "CREDIT_CARD_NUMBERS")
In background, an SQL statement is created and executed, which identifies the row based on the mac value and deletes it from the token vault.