# ActivateStatusListener

Call the **ActivateStatusListener** API to monitor the status of the **activatePayment** API.

## Method Signature

```java
public interface ActivateStatusListener {

    void onActivateResult(int result, String errorCode, String errorMessage);

}
```

## Request parameters

| **Item** | **Type** | **Parameters** | **Description** | **Required** |
| --- | --- | --- | --- | --- |
| onActivateResult() | Function | int result String errorCode String errorMessage | This method acts as a callback handler, and executes when an event is triggered by the **activatePayment** API. For more information about the parameters of the function, see [Sub-parameters](#SCdHu). | Required |

### Sub-parameters

| **Item** | **Type** | **Description** | **Required** |
| --- | --- | --- | --- |
| result | int | The processing result of the **activatePayment** API. For valid values, see [Token status](#EFiS4). | Required |
| errorCode | String | The result code. For more information, see [Result codes](result_codes). | Required |
| errorMsg | String | The result message. For more information, see [Result codes](result_codes). | Required |

#### Token status

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

## Response parameters

N/A

## Sample

```java
ACTapManager manager = ACTapManager.getInstance(this.getApplication());
manager.setActivateStatusListener(new ActivateStatusListener() {
    @Override
    public void onActivateResult(int result, String errorCode, String errorMessage) {
    }
});
```