# deleteToken

Call the **deleteToken** API to delete the NFC card activation token.

# Method signature

```java
void deleteToken(@Nullable ACResultCallback<Boolean> callback)
```

# Request parameters

| **Item** | **Type** | **Description** | **Required** |
| --- | --- | --- | --- |
| callback | [ACResultCallback](ac_result_callback)<Boolean> | The NFC card activation token deletion result. Valid values are: - `true`: Successfully deleted the NFC card activation token. - `false`: Failed to delete the NFC card activation token. | Optional |

# Response parameter

N/A

# More information

Calling the **deleteToken** API can delete only tokens with certain statuses.

### Token status

| **Code** | **Token status** | **Allow deletion?** |
| --- | --- | --- |
| \-3 | White box crashed. | No |
| \-2 | Disconnected. | No |
| \-1 | Query failed. | No |
| 0 | The card does not exist. | No |
| 1 | The card exists, but there are no credentials. Call the **replenish** API to replenish credentials. | Yes |
| 2 | Payment is allowed. | Yes |
| 3 | The card is locked. Call the **unlock** API to unlock. | Yes |
| 11 | The card is in activation. | No |
| 21 | The card is activated successfully but requires secondary confirmation. | No |

# Sample

```java
manager.deleteToken(new ACResultCallback<Boolean>() {
    @Override
    public void onResult(Boolean result, String errorCode, String errorMsg) {
        runOnUiThread(new Runnable() {
            @Override
            public void run() {
                log("delete token result = " + result + ", errorMsg = " + errorMsg);
                findViewById(R.id.btn_delete_token).setEnabled(true);
                Toast.makeText(LoginActivity.this, result ? "Card deletion succeeds" : "Card deletion fails", Toast.LENGTH_LONG).show();
            }
        });
    }
});
```