> 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/transit-digitization/ja/google-transit-no/akauntobsunochikettinguabt/worettonopurobijoningunopurodakuto.md).

# ウォレットのプロビジョニング後の運賃プロダクト購入

Walletの事後プロビジョニング運賃商品購入ワークフローは、ユーザーがWalletアプリを通じて開始します。主な目的は、ユーザーが運賃商品を購入または更新し、それがGoogle Walletの交通カードにシームレスに適用され即座に使用できるようにすることです。

### ワークフロー <a href="#workflow" id="workflow"></a>

以下の高レベルの手順は、Walletの事後プロビジョニング運賃商品購入ワークフローの概要を示しています：

**運賃商品の選択**：ユーザーは購入したい運賃商品を選択します。オプションには既存の残高に残高を追加することや、通勤プランを購入／更新することが含まれる場合があります。

**支払い**：ユーザーが選択した運賃商品の購入を承認すると、Payment Managerが支払いを処理します。

**メタデータの取得とWallet表示の更新**：metadataUpdatedリクエストを受信すると、GoogleはD1 Transitから更新されたカードメタデータを要求します。

#### 運賃商品の選択 <a href="#fare-product-selection" id="fare-product-selection"></a>

**エラーシナリオ**

**購入不可**

共住ルールエンジンがビジネスルールにより購入可能な商品がないと判断した場合、D1 Transitは空の配列を返すことでGoogleに通知する必要があります。これは選択されたカードに対して購入アクションが利用できないことを示します。

<figure><img src="/files/97b4c4431d2c4e72d17c7f89c077248e2bd18ce9" alt=""><figcaption></figcaption></figure>

#### 支払い <a href="#payment" id="payment"></a>

ユーザーが支払いを承認すると、purchaseProducts API呼び出しがトリガーされD1 Transitプラットフォームに送信され、D1 TransitはTransit イシュアにpurchaseProductsリクエストを送信します。Transit イシュアは支払いリクエストがPSPによって処理されることを確実にする責任があります。

処理後、トランザクションの結果がGoogleに通知されます。

<figure><img src="/files/e4157fa9c825f5a657c3b343b7b823862ece7f75" alt=""><figcaption></figcaption></figure>

#### メタデータの取得とWallet表示の更新 <a href="#metadata-retrieval-and-wallet-display-update" id="metadata-retrieval-and-wallet-display-update"></a>

運賃商品の購入または更新が正常に完了した後、Transit イシュアはhandleEventをD1 Transitに送信し、D1 TransitはallProductMetadataUpdated APIリクエストでGoogleに通知します。

allProductMetadataUpdatedリクエストを受信すると、GoogleはgetAllProductMetadataリクエストをD1 Transitに行い商品メタデータを取得します。

<figure><img src="/files/9a3d62667a7876b5b7317072a246647cc71d31eb" alt=""><figcaption></figcaption></figure>


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.payments.thalescloud.io/transit-digitization/ja/google-transit-no/akauntobsunochikettinguabt/worettonopurobijoningunopurodakuto.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
