> 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/click-to-pay/implement-click-to-pay-issuers/enroll-cards-in-click-to-pay/enroll-cards-by-d1-api.md). Agents can also search and read this documentation through its [MCP server](https://docs.payments.thalescloud.io/~gitbook/mcp).

# Enroll cards by D1 API

## Overview

This page explains how the issuer backend can enroll a card and its end user in Click to Pay by calling the D1 API [Click to Pay enrol](https://docs.payments.thalescloud.io/click-to-pay/integrate-the-d1-api/d1-api-summary.md).

Use this backend flow when you want to orchestrate Click to Pay enrollment from the issuer backend without relying on the issuer application to call the API directly.

## User experience

<figure><img src="https://747329373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuKGiYHoxBTUoHkwRFlXH%2Fuploads%2F3liYHSHVk2mBnVBZQmrM%2FUX%20-%20Enroll%20to%20C2P.svg?alt=media&amp;token=e40eb79a-4e57-420a-8d44-8cb83eb9abdf" alt=""><figcaption></figcaption></figure>

## Flow

The following diagram illustrates the main steps of the backend Click to Pay enrollment flow:

<figure><img src="https://747329373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuKGiYHoxBTUoHkwRFlXH%2Fuploads%2FE30mNoZjNPEtB2Fy6dZg%2FFlow%20-%20%20Enroll%20cards%20by%20D1%20API.svg?alt=media&amp;token=f82e4ae2-c6cc-4689-8711-d7746317dd46" alt=""><figcaption></figcaption></figure>

## Sequence diagram

### Prerequisites

Please refer to [prerequisites](https://docs.payments.thalescloud.io/click-to-pay/implement-click-to-pay-issuers/enroll-cards-in-click-to-pay.md#prerequisites).

The following sequence diagram shows the Click to Pay enrollment flow initiated from the issuer backend:

<figure><img src="https://747329373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuKGiYHoxBTUoHkwRFlXH%2Fuploads%2FppZO1avIUya1gOkuo5FI%2FSequence%20Diagram%20-%20Click%20to%20Pay%20-%20%20Enroll%20cards%20by%20D1%20API.svg?alt=media&amp;token=920fb9bd-35d7-48f1-89f0-2b694f039d33" alt=""><figcaption></figcaption></figure>

### Key points

* The issuer backend must already know the end user's personal and card details.
* The enrollment is an asynchronous operation. The final result can be retrieved by either:
  * calling the standard getter operation, or
  * enabling D1 backend notifications (check the [API summary](https://docs.payments.thalescloud.io/click-to-pay/integrate-the-d1-api/d1-api-summary.md)).
* The TSP associated with the payment network triggers the usual digitization flow. The issuer backend continues to manage this flow as usual; no changes are required. Because Click to Pay applies to e-commerce transactions, approval is generally expected.

{% hint style="warning" %}
This API does not support bulk enrollments. If you need to perform mass enrollment of cards in the Click to Pay service, use [batch file registration with Click to Pay auto enrollment](https://docs.payments.thalescloud.io/click-to-pay/register-cards-via-batch-file.md).

Contact your Thales representative to configure the auto enrollment feature.
{% endhint %}


---

# 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/click-to-pay/implement-click-to-pay-issuers/enroll-cards-in-click-to-pay/enroll-cards-by-d1-api.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.
