> 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/d1-v1-api/ja/d1deendoyztokdowosuru.md).

# D1でエンドユーザーとカードを登録する

D1サービスを使用する前に、エンドユーザー、アカウント、カードを登録してください。

登録はイシュアのバックエンドからD1のバックエンドへのフローです。\
D1サービスでカードを使用する前であれば、いつでもカードを登録できます。

イシュアのバックエンドは独自の識別子を提供します：

* `consumerId` エンドユーザー用
* `accountId` アカウント用
* `cardId` カード用

これらの識別子は、D1 APIでリソースを参照する際やトラブルシューティング時に使用されます。

{% hint style="info" %}
このフローはTokenization v1のみを使用する場合に使用できます。
{% endhint %}

{% hint style="info" %}
D1 APIでは次の用語を使用しています： **consumer** エンドユーザーを指します。\
このドキュメントでは **end user**を使用し、APIフィールド名はそのままにしています（例えば、 `consumerId`).
{% endhint %}

## 登録フロー

<figure><img src="/files/27adcef838c34dfa559c0337b815cb2b2d0fd707" alt=""><figcaption><p>エンドユーザーとカードの登録フロー（イシュアのバックエンドからD1のバックエンドへ）</p></figcaption></figure>

## 識別子を選ぶ

イシュアのバックエンドがアカウントを管理していない場合（または安定した `accountId`がない場合）、 `consumerId` をとして使用してください `accountId`.

{% hint style="warning" %}
識別子については次のルールに従ってください：

* 次を確実にしてください `consumerId`, `accountId`、および `cardId` はあなたのD1テナント内で一意であること。
* には個人を特定できる情報（PII）を含めないでください `consumerId` または `accountId`.
* には機密性の高いカードデータ（例えばPAN）を含めないでください `cardId`.
  {% endhint %}

## カードを持つエンドユーザーを登録する

を呼び出します [Register Consumer with cards](broken://pages/acc37cfc875ce1503dc2be6f63decfe9e3f2207a#put-issuers-issuerid-consumers-consumerid-cards) をイシュアのバックエンドから呼び出します。

既存のエンドユーザーにさらにカードを追加するには、同じAPIを再度呼び出してください。\
既存の `consumerId`を再利用し、ペイロードに新しいカードを含めてください。

<details>

<summary>レガシーv1登録API</summary>

これらのエンドポイントは、以下がリリースされる前に統合した場合に引き続き利用可能です： `Register Consumer with cards` がリリースされました：

* [Register Consumer](broken://pages/acc37cfc875ce1503dc2be6f63decfe9e3f2207a#put-issuers-issuerid-consumers-consumerid)
* [Register Account](broken://pages/16a197dcd39ee97ec4eb7e558a444614f5ac6ab5#put-issuers-issuerid-accounts-accountid)
* [Register Card](broken://pages/3a01e333d68c5a2b5aac9295129a66f708dbe2ab#put-issuers-issuerid-cards-cardid)

</details>


---

# 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:

```
GET https://docs.payments.thalescloud.io/d1-v1-api/ja/d1deendoyztokdowosuru.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
