# Update card details You can update a card's details using the Dashboard and the API at any point in its lifetime. > **Note** > > - You can only update the expiry date for virtual cards. > - Updating a virtual card's expiry month and/or year automatically updates the CVC2 code. Ensure you notify the cardholder so they can continue using the card with the new credentials. > - All cards have a maximum lifetime of three years from creation. You cannot update a virtual card's expiry date beyond this lifetime. --- ## Update card details in the Dashboard In the Dashboard, you can update the card reference for identifying the card and the five user-defined fields available when you created the card. You must have the `Manage Issuing data` [user permission](https://www.checkout.com/docs/business-operations/use-the-dashboard/manage-users/user-permissions.md). 1. Sign in to the [Dashboard](https://dashboard.checkout.com/). 2. Go to _Issuing_ > _Cards_. 3. Use search or filters to find the required card, and select it to view the _Card details_ page. 4. In the _Custom data_ tile, select _Edit_. 5. Make the required changes, and then select _Save_. --- ## Update card details using the API Call the [Update card details](https://api-reference.checkout.com/tag/Cards/#operation/updateCard) endpoint, and provide the `{cardId}` in the path. You can then set, update, or remove the following details: - The card `reference` for identifying the card – To remove, set to `null`. - The user-defined metadata fields: `udf1`, `udf2`, `udf3`, `udf4`, `udf5` – To remove, set to `null`. - The `expiry_month` and `expiry_year` (virtual cards only) – You cannot set these fields to `null`. If you do not want to provide a value, do not include these fields in the request. - The card `status` – Set to `active` to activate the card. - The `scheduled_activation_date` or `scheduled_revocation_date` to schedule a change to the card's status – To remove, set to `null`. > **Note** > > You cannot set `status` to `active` and provide `scheduled_activation_date` in the same request. To receive a notification whenever a card's details are updated, subscribe to the [Card details changed](https://www.checkout.com/docs/developer-resources/event-notifications/event-types/card_details_changed.md) webhook. ### Request example > **Information** > > Your base URL's `{prefix}` value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see [API endpoints](https://www.checkout.com/docs/developer-resources/api/api-endpoints.md). **Production** `PATCH` `https://{prefix}.api.checkout.com/issuing/cards/{cardId}` **Sandbox** `PATCH` `https://{prefix}.api.sandbox.checkout.com/issuing/cards/{cardId}` ```json { "reference": "X-123456-N11", "metadata": { "udf1": "metadata1", "udf2": "metadata2", "udf3": "metadata3", "udf4": "metadata4", "udf5": "metadata5" }, "expiry_month": 5, "expiry_year": 2025, "status": "active", "scheduled_activation_date": "2026-06-01", "scheduled_revocation_date": "2027-03-12" } ``` ### Response example ```json { "id": "crd_fa6psq242dcd6fdn5gifcq1491", "client_id": "cli_vkuhvk4vjn2edkps7dfsq6emqm", "entity_id": "ent_fa6psq242dcd6fdn5gifcq1491", "cardholder_id": "crh_d3ozhf43pcq2xbldn2g45qnb44", "card_product_id": "pro_7syjig3jq3mezlc3vjrdpfitl4", "user_id": "usr_fa6psq242dcd6fdn5gifcq1491", "last_four": "1234", "expiry_month": 5, "expiry_year": 2025, "status": "active", "display_name": "TOBY ARDEN", "type": "virtual", "billing_currency": "USD", "issuing_country": "US", "reference": "X-123456-N11", "metadata": { "udf1": "metadata1", "udf2": "metadata2", "udf3": "metadata3", "udf4": "metadata4", "udf5": "metadata5" }, "scheduled_revocation_date": "2027-03-12", "scheduled_activation_date": "2026-06-01", "last_activated_on": "2019-09-10T10:11:12Z", "root_card_id": "crd_fa6psq242dcd6fdn5gifcq1491", "parent_card_id": "crd_qm26t52qz3yejjo2t4btqvxtzi", "scheme": "mastercard", "created_date": "2021-09-09T19:41:39Z", "last_modified_date": "2021-09-09T19:41:39Z", "_links": { "self": { "href": "https://{prefix}.api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491", "actions": [ "GET" ], "types": [ "application/json" ] }, "credentials": { "href": "https://{prefix}.api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491/credentials", "actions": [ "GET" ], "types": [ "application/json" ] }, "revoke": { "href": "https://{prefix}.api.checkout.com/issuing/cards/crd_fa6psq42dcdd6fdn5gifcq1491/revoke", "actions": [ "POST" ], "types": [ "application/json" ] }, "controls": { "href": "https://{prefix}.api.checkout.com/issuing/controls?target_id=crd_fa6psq42dcdd6fdn5gifcq1491", "actions": [ "GET" ], "types": [ "application/json" ] } }, "is_single_use": false } ``` --- ## Subscribe to webhooks You can set up webhooks to be notified when card details are updated: 1. [Configure your webhook server](https://www.checkout.com/docs/developer-resources/event-notifications/receive-webhooks/configure-your-webhook-server.md). 2. Subscribe to the [Card details changed](https://www.checkout.com/docs/developer-resources/event-notifications/event-types/card_details_changed.md) webhook.