> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mangopay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# The Card Registration object

> Register card details to obtain a `CardId` token for one-time, recurring, or preauthorized card payments

### Description

Mangopay  relies on the Card Registration object to safely tokenize a card and create the [Card](/api-reference/cards/card-object) object.

Successfully registering a card to create the Card object is a multiple-step process. It is necessary to process card payments (direct, preauthorized, and recurring card pay-ins) or validate the card.

<Note>
  **Note – Card validation within 24 hours**

  A successful transaction (preauthorization, pay-in, or recurring) or card validation within 24 hours of the card registration is required to validate a card. Otherwise, the card becomes invalid and a new card registration will be necessary.
</Note>

<Warning>
  **Warning – End user approval**

  Under no circumstances should card information be kept without the end user's approval. If you don’t have the end user’s approval, you need to deactivate the card.
</Warning>

<Tip>
  **Best practice – Use Checkout SDK**

  Simplify payments by card and other payment methods with the Mangopay [Checkout SDK](/sdks/checkout).
</Tip>

### Attributes

<ParamField body="Id" type="string">
  The unique identifier of the Card Registration object.
</ParamField>

<ParamField body="Tag" type="string">
  Custom data that can be added to this object.\
  In the case of the Card Registration, this parameter can be used to facilitate the link between the User object and its equivalent on your platform for instance. This value will be inherited by the Card object `Tag` parameter and will not be editable.
</ParamField>

<ParamField body="CreationDate" type="Unix timestamp">
  The date and time at which the object was created.
</ParamField>

<ParamField body="UserId" type="string">
  The unique identifier of the user the card belongs to.
</ParamField>

<ParamField body="AccessKey" type="string">
  The secure value to use when tokenizing the card via the dedicated endpoint.
</ParamField>

<ParamField body="PreregistrationData" type="string">
  The secure value to identify the registration when tokenizing the card via the dedicated endpoint.
</ParamField>

<ParamField body="RegistrationData" type="string">
  The string returned by the tokenization server on the <a href="/api-reference/card-registrations/tokenize-card">POST Tokenize the card</a> endpoint. This string must be sent in full as the `RegistrationData` on the <a href="/api-reference/card-registrations/update-card-registration">PUT Update a Card Registration</a> endpoint to create the Card object.
</ParamField>

<ParamField body="CardId" type="string">
  The unique identifier of the Card object, which is returned after updating the Card Registration object with the `RegistrationData`.
</ParamField>

<ParamField body="CardType" type="string">
  **Returned values:** `CB_VISA_MASTERCARD`, `AMEX`, `MAESTRO`, `BCMC`

  **Default value:** `CB_VISA_MASTERCARD`

  The type of the card. If not supplied, the default value will be taken into account.
</ParamField>

<ParamField body="CardRegistrationURL" type="string">
  The URL to make the card tokenization call.

  **Caution:** This variable URL is specific to each card registration. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it.
</ParamField>

<ParamField body="ResultCode" type="string">
  The code indicating the result of the operation. This information is mostly used to <a href="/errors/codes">handle errors</a> or for filtering purposes.
</ParamField>

<ParamField body="ResultMessage" type="string">
  The explanation of the result code.
</ParamField>

<ParamField body="Currency" type="string">
  **Returned values:** The three-letter <a href="/api-reference/overview/data-formats" target="_blank">ISO 4217 code</a> (EUR, GBP, etc.) of a <a href="/guides/currencies" target="_blank">supported currency</a> (depends on feature, contract, and activation settings).

  The currency of the card.
</ParamField>

<ParamField body="Status" type="string">
  **Returned values:** `CREATED`, `VALIDATED`, `ERROR`

  The status of the card registration:

  * `CREATED` – The card registration has been created, but no `RegistrationData` has been entered yet and the `CardId` value is `null`.
  * `VALIDATED` – The card registration has been successfully updated with the `RegistrationData` from the tokenization server.
  * `ERROR` – The card registration couldn’t be updated with the `RegistrationData` and no `CardId` was generated. For more information, refer to the `ResultCode` (<a href="/errors/codes/105206">105206</a>, <a href="/errors/codes/105299">105299</a>) and `ResultMessage`.
</ParamField>

### Related resources

<CardGroup cols={2}>
  <Card title="How to" href="/guides/payment-methods/card/direct/how-to">
    Learn how to process a card payment
  </Card>

  <Card title="Guide" href="/guides/payment-methods/card">
    Learn about card registration and processing
  </Card>

  <Card title="Testing" href="/testing/payment-methods">
    Learn more about testing all payment methods
  </Card>

  <Card title="Checkout SDK" href="/sdks/checkout">
    Simplify card registration with Checkout SDK
  </Card>
</CardGroup>
