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

# CVV Retention Policy

> Configure how long CVV data is retained and how many times it can be used. PCI DSS enforcement with per-token policies.

PCI DSS prohibits long-term storage of CVV data. When a card is tokenized with CVV, you need a retention policy that defines how long the CVV is kept and how many times it can be used before it is automatically cleared.

## How It Works

CVV retention is not part of the tokenization request itself. It is a separate step that happens after tokenization:

1. **Card is tokenized** (via any [tokenization method](/capture-cards/overview)) with CVV included.
2. **You have 60 minutes** to set a per-token CVV retention policy via the [Set CVV Retention Policy](/api-reference/manage-tokens/set-cvv-retention-policy) endpoint.
3. **If you don't set one**, the account-wide default policy is applied automatically. If no account-wide default exists, the system default applies: CVV can be used once and is then cleared.

This applies to every tokenization method that captures CVV.

## Policy Levels

| Level                    | Description                                                                                                         |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------- |
| **System default**       | CVV can be used once and is then cleared. Applies when no other policy is set.                                      |
| **Account-wide default** | Set by your account administrator. Applies automatically to all new tokens unless overridden by a per-token policy. |
| **Per-token**            | Set via the API within 60 minutes of tokenization. Overrides the account-wide default for that specific token.      |

## Policy Types

| Type                | How It Works                                                                                                                                                     |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Time-based**      | CVV is automatically cleared after a specified date/time (`CvvEndRetentionDate`).                                                                                |
| **Per-destination** | Different retention rules for different destinations. For example, keep CVV available for your primary PSP but clear it after one use for a secondary processor. |
| **Usage-based**     | CVV is cleared after it has been sent to a destination a specified number of times (quota).                                                                      |

## Destination Types

Per-destination policies support these destination types:

| Type              | Description                                                     |
| ----------------- | --------------------------------------------------------------- |
| **HostName**      | A specific host (e.g. `api.stripe.com`).                        |
| **Owner**         | The token owner account.                                        |
| **OtherMerchant** | Other merchant accounts that have permission to use this token. |
| **SFTP**          | An SFTP server by IP address.                                   |
| **OtherUser**     | Other users in the system.                                      |

## Auto-Delete Card on CVV Expiry

You can optionally configure the policy to delete the entire card token when its CVV is cleared, using the `DeleteCardUponCvvCleanup` option. Use this when a token without CVV has no value in your workflow.

## Setting the Account-Wide Default

To set a default CVV retention policy that applies automatically to all new tokens in your account:

1. Log in to the [PCI Booking portal](https://users.pcibooking.net).
2. Navigate to **Booker Settings** > **CVV Store Rules**.
3. Under **Storage Period**, set the duration that CVV is stored (e.g., 12 months). Maximum is 4 years / 48 months.
4. Under **Destinations**, define the approved list of destinations where CVV can be relayed. For each destination, specify:
   * **Destination type** (see [Destination Types](#destination-types) above)
   * **Destination value** (e.g., hostname, IP address)
   * **Quota** (number of times the CVV can be relayed to this destination)

<Info>
  You can configure up to 50 different destinations. Each destination allows a quota of up to 50 relays.
</Info>

<Warning>
  If you use destination-based retention with hostnames, make sure those hostnames are also included in your [relay restrictions](/account-setup/security-settings) (if configured).
</Warning>

Per-token policies set via the API override the account-wide default for that specific token.

## Managing Per-Token Policies

| Action                                        | API Endpoint                                                                                        |
| --------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| Set or update policy                          | [Set CVV Retention Policy](/api-reference/manage-tokens/set-cvv-retention-policy).                  |
| View current policy and usage                 | [Get CVV Retention Policy](/api-reference/manage-tokens/get-cvv-retention-policy).                  |
| View policy for a specific destination        | [Get Specific Policy](/api-reference/manage-tokens/get-cvv-retention-policy-specific).              |
| Remove policy (revert to account default)     | [Delete CVV Retention Policy](/api-reference/manage-tokens/delete-cvv-retention-policy).            |
| Remove policy for a specific destination type | [Delete Policy by Type](/api-reference/manage-tokens/delete-cvv-retention-policy-type).             |
| Remove policy for a specific destination      | [Delete Policy by Destination](/api-reference/manage-tokens/delete-cvv-retention-policy-type-data). |

## Next Steps

<CardGroup cols={2}>
  <Card title="CVV Management" icon="book" href="/manage-tokens/cvv-management">
    Manage CVV data within a token: check status, capture separately, or clear manually.
  </Card>

  <Card title="Capture Cards Overview" icon="book" href="/capture-cards/overview">
    All tokenization methods.
  </Card>
</CardGroup>
