> For the complete documentation index, see [llms.txt](https://docs.verygoodsecurity.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verygoodsecurity.com/cmp/payment-credentials/apple-pay/create-card-using-dpan-or-mpan.md). Agents can also search and read this documentation through its [MCP server](https://docs.verygoodsecurity.com/~gitbook/mcp).

# Create Card - Using DPAN or MPAN

## **Overview**

The CMP Create Card API supports storing digital wallet cards, including Apple Pay Device PANs (DPANs) and Merchant PANs (MPANs), alongside traditional physical cards (PANs).

Cards classified as `dpan` or `mpan` from Apple Pay do not trigger downstream services such as Account Updater or Network Token provisioning, even if the service is configured to be [onCreate enrollment type](https://docs.verygoodsecurity.com/cmp/platform/cmp-account.md#on-create-enrollment). Cards stored in this way behave similarly to traditional cards but are tagged with Apple Pay metadata.

To store an decrypted Apple Pay DPAN or MPAN, include the wallet token in the `pan` field of the Create Card request. Additionally, specify the following in the card object:

* `wallet_type`: apple\_pay
* `token_type`: dpan / mpan

It’s important that merchants pass these values in **lowercase only**, as incorrect formatting will cause validation errors.

**Note:**&#x20;

* Apple Pay wallet tokens are only retrievable through `GET /cards/{id}`. They are clearly marked as DPAN or MPAN and are **not included in notifications**.
* Apple Pay DPAN/MPAN cards **do not trigger downstream services** such as Account Updater, Network Token provisioning or 3DS.
* This applies even if the service is configured for `onCreate` enrollment.
* Tokenized wallet cards are retrievable via  [`GET /cards/{id}`](https://docs.verygoodsecurity.com/cmp/developer-resources/api/cards#get-cards-card_id) .

#### Validation Rules when Creating a Card with DPAN/MPAN

* If creating a DPAN or MPAN from Apple Pay, the `wallet_type` field **must** be included. Omitting it will return a **422 Unprocessable Entity** error.
* For physical PANs, `wallet_type` and `token_type` are optional, but `token_type` is always returned in the response as `pan`.
* Both `wallet_type` and `token_type` must be lowercase. For example: `"Apple Pay"` or `"apple_Pay"` will fail validation. Similarly, `"DPAN"` or `"MPAN"` in uppercase will also fail, returning **400 Bad Request**.

You can see a sample request and response for Apple Pay cards here: **VGS Card Management API –** [**Create a Card**](https://docs.verygoodsecurity.com/cmp/api-dev/cards.md#post-cards).

#### Retrieve Card (GET /cards/{id})

When retrieving an Apple Pay card, the response includes `wallet_type` and `token_type` in the card object. These values match the ones sent during creation (`wallet_type: apple_pay`, `token_type: dpan/mpan`) and clearly indicate that the card is an Apple Pay DPAN or MPAN.

Sample response: **VGS Card Management API –** [**Get a Card**](https://docs.verygoodsecurity.com/cmp/api-dev/cards.md#get-cards-card_id).

#### Onboarding Requirements

No extra steps are needed. Customers already using CMP for card creation can immediately store Apple Pay cards without additional setup.


---

# 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.verygoodsecurity.com/cmp/payment-credentials/apple-pay/create-card-using-dpan-or-mpan.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.
