> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/classic-push-provisioning/ja/ysuksu/to/raifusaikuru.md).

# 制御: ライフサイクル操作

イシュアアプリケーションが消費者の検証を行った後、トークンの状態（サスペンド、再開、削除、またはアクティベート）を更新できます。Push Provisioning SDK はイシュアアプリケーションがこのリクエストを管理することを可能にします。SDK はリクエストを TSH に送信し、その後直接 TSP に送信します。

参照 [認可コード（JWT 形式）](/classic-push-provisioning/ja/gaido/dtato/kdojwt.md) のための `認可コード` このプロセスに必要です。\` `sub` クレームはトークン参照でなければなりません。

> <i class="fa-info-circle">:info-circle:</i>
>
> #### 注意 <a href="#note" id="note"></a>
>
> * Push Provisioning SDK は特定のライフサイクル操作がトークンに対して許可されているかどうかをチェックしません。
> * イシュアアプリケーションは操作を呼び出す前にトークンの状態を検証する必要があるかもしれません。例えば、Activate アクションはトークンが [PENDING\_IDV](https://thalesgroup.github.io/d1sdk-docs/tpc-sdk/android/latest/com/thalesgroup/tpcsdk/model/Token.html#getState\(\)) 状態であることを要求します。
>   * Apple Pay： [requiresActivation](https://developer.apple.com/documentation/passkit/pksecureelementpass/passactivationstate/requiresactivation) 状態であることを要求します。
>   * Google Pay： [GOOGLE\_PAY\_TOKEN\_STATE\_NEEDS\_IDENTITY\_VERIFICATION](https://thalesgroup.github.io/d1sdk-docs/tpc-sdk/android/latest/com/thalesgroup/tpcsdk/provisioning/CardDigitizationStatus.html#GOOGLE_PAY_TOKEN_STATE_NEEDS_IDENTITY_VERIFICATION)
>   * Samsung Pay： [SAMSUNG\_PAY\_PENDING\_PROVISION](https://thalesgroup.github.io/d1sdk-docs/tpc-sdk/android/latest/com/thalesgroup/tpcsdk/provisioning/CardDigitizationStatus.html#SAMSUNG_PAY_PENDING_PROVISION)

<figure><img src="https://3356216997-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC22AqJs7fn1cZC7pAaOE%2Fuploads%2FHymY6cbaiZKoqbRFTfyl%2F63e21e3b-a1be-4176-97aa-99442be70258.png?alt=media&amp;token=1891ca15-1732-425f-9f28-6df6fcbc6827" alt=""><figcaption></figcaption></figure>

{% tabs %}
{% tab title="iOS" %}

```swift
// SCHEME が VISA の場合にのみ関連、MASTERCARD の場合は空文字を入れる
let tokenRequestorId = "40010030273" // Visa 用の Apple Pay

let scheme = "SCHEME" // VISA、MASTERCARD、AMEX
let authorizationCode = "<JWT>" // 特定のカードに関連する JWT 値を指定（イシュアのバックエンドから取得）
let tokenId = pass.secureElementPass?.deviceAccountIdentifier // または `Token.id` から取得可能

TPCSDK.updateTokenState(tokenId: tokenId,
                        tokenRequestorId: tokenRequestorId,
                        schemeString: scheme,
                        authorizationCode: authorizationCode,
                        action: .Activate) { success, error in
    if let error = error {
      // TPC エラーを処理
    } else if success {
      // todo: カードのデジタル化状態を示すために UI を更新
    }
}
```

{% endtab %}

{% tab title="Android" %}

```java
// SCHEME が VISA の場合にのみ関連、MASTERCARD の場合は空文字を入れる
String tokenRequestorId = "40010075001"; // Google Pay 用、または Samsung Pay 用は "40010043095"

String tokenId = "tokenId";
String scheme = "SCHEME"; // VISA、MASTERCARD
String authorizationCode = "<JWT>"; // 特定のカードに関連する JWT 値を指定（イシュアのバックエンドから取得）

TPCManager.getInstance().getTSHProxy().updateTokenState(tokenId,
        tokenRequestorId,
        scheme,
        authorizationCode,
        TokenAction.ACTIVATE,
        new TPCSDKListener<Boolean>() {
            @Override
            public void onStart() {
                // 開始時の処理
            }

            @Override
            public void onSuccess(TPCResult<Boolean> result) {
                Log.i(TAG, "Token State Updated");
                Boolean status = result.getResult();

                // TODO: 新しいステータスに合わせて UI を更新
            }

            @Override
            public void onError(TPCSDKException exception) {
                Log.e("TAG", "updateTokenState request Error = " + exception.getMessage());
            }
        });
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.payments.thalescloud.io/classic-push-provisioning/ja/ysuksu/to/raifusaikuru.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
