# Parameters to Update a Card
source: https://developer.mastercard.com/donations/documentation/parameters/manage-cards-param/update-a-card-param/index.md

## Method to Update a card {#method-to-update-a-card}

| Method |                   Endpoint                   |
|--------|----------------------------------------------|
| PUT    | /donations/donors/{donor_id}/cards/{card_id} |

## Path Parameters {#path-parameters}

|  Parameter  |                       Description                        |
|-------------|----------------------------------------------------------|
| **donorId** | ID generated by Mastercard when a new donor is enrolled. |
| **cardId**  | Unique ID for the card on file. Generated by Mastercard  |

## Request Parameters {#request-parameters}

Note: The Entire Request Body has to be encrypted! For more details, refer to the [How to Encrypt](https://developer.mastercard.com/donations/tutorial/how-to-access-sandbox-environment/mastercard-encryption-decryption-mechanism/index.md) section.

|              Name              |  Type  |                                                                                                          Description                                                                                                           |                                       Notes                                        |
|--------------------------------|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------|
| **cardholderName**             | string | The card holder's name as it appears on the card.                                                                                                                                                                              | Optional                                                                           |
| **primaryAccountNumberSource** | string | The source of the primary account number (PAN).                                                                                                                                                                                | Optional                                                                           |
| **expiryInfo**                 | object | The expiry info. See [Expiry Info](https://developer.mastercard.com/donations/documentation/parameters/manage-cards-param/update-a-card-param/index.md#expiryInfo) attributes.                                                 | **Required**                                                                       |
| **billingAddress**             | object | An object representing the cardholder's billing address. See [Billing Address](https://developer.mastercard.com/donations/documentation/parameters/manage-cards-param/update-a-card-param/index.md#billingAddress) attributes. | Conditional If we provide the address object it is Mandatory, else it is Optional. |
| **cardAlias**                  | string | The alias provided by the cardholder to identify the card. Maximum 40 characters.                                                                                                                                              | Optional                                                                           |

### Child Attributes {#child-attributes}

#### expiryInfo {#expiryinfo}

|   Name    |  Type  |                                                                                          Description                                                                                          |    Notes     |
|-----------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|
| **month** | string | The expiration month of the associated card as an integer between 1 and 12. in [Internet date format](https://tools.ietf.org/html/rfc3339#section-5.6). Minimum value: 01. Maximum value: 12. | **Required** |
| **year**  | string | The four-digit year of the card's expiration date in [Internet date format](https://tools.ietf.org/html/rfc3339#section-5.6).                                                                 | **Required** |

#### billingAddress {#billingaddress}

|      Name       |  Type  |                                                                                       Description                                                                                        |  Notes   |
|-----------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
| **line1**       | string | The type of address. Allowed values are : *home* , *work* and *others*                                                                                                                   | Optional |
| **line2**       | string | The donor's street address.                                                                                                                                                              | Optional |
| **line3**       | string | The donor's land mark or other address.                                                                                                                                                  | Optional |
| **city**        | string | City, district, suburb, town or village                                                                                                                                                  | Optional |
| **postalCode**  | string | The postal code, which is the zip code or equivalent. Typically required for countries with a postal code or an equivalent. See [Postal Code](https://en.wikipedia.org/wiki/Postal_code) | Optional |
| **countryCode** | string | Three-character [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) code that identifies the country or region.                                                       | Optional |

## Response Parameters {#response-parameters}

|              Name              |  Type  |                       Description                       |
|--------------------------------|--------|---------------------------------------------------------|
| **cardId**                     | string | Unique ID for the card on file. Generated by Mastercard |
| **primaryAccountNumberSuffix** | string | The last 4 digits of the card number.                   |

