---
page_source: https://docs.juspay.io/paytm-gateway-configuration/docs/express-checkout/update-card
page_title: Update Card
---

## API Version: default


# Update Card



Update nickname and name_on_card for the stored card## Endpoints:
- Production: https://api.juspay.in/card/update

## Request Type: 
POST

## Authorization:

#### Basic Auth:
Consists of two parts.

* Username: API Key obtained from Juspay dashboard
* Password: Empty string
- Value: <p>Example:- <br> Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==</p>
- Tags: Base64 Encoded Username:Password, Mandatory
## Sample Code Snippets:
### Sample Request:

#### Request Code Snippet:

```request
curl -X POST https://api.juspay.in/card/update \
-u your_api_key: \
-d card_token=c75a9fca-1121-xxxx-xxxx-47d5c4971456
-d customer_id=cst_123456789
-d nickname=john
```

### Sample Response:

#### Response:
```json
{
  "card_token": "c75a9fca-1121-418e-973c-47d5c4971456",
  "user_message": "Card details updated",
  "status": "SUCCESS"
}
```

## Body Parameters:
### Parameters:

#### card_token:
- Description: Card token obtained from /card/list API
- Tags: string, Required

#### customer_id:
- Description: Customer ID against which the card is stored. This is same as the object_reference_id using which was customer was created
- Tags: string, Required

#### name_on_card:
- Description: Pass a new value, if name on card needs to be updated, alphabet and spaces allowed with length limit of 64 chars.
- Tags: string

#### nickname:
- Description: Pass a new value, if nickname needs to be updated, alphabet and spaces allowed with length limit of 64 chars.
- Tags: string
## API Responses:
### 200:

#### card_token:
- Description: c75a9fca-1121-418e-973c-47d5c4971456
- Tags: string

#### user_message:
- Description: Card details updated
- Tags: string

#### status:
- Description: SUCCESS
- Tags: string
### 400:

#### Invalid Customer Id:
- Value:
  - **Error**:
    - Description: true
    - Tags: String
  - **Error_message**:
    - Description: BAD_REQUEST
    - Tags: String
  - **User_message**:
    - Description: Invalid customer id
    - Tags: String, Mandatory
- Tags: JSON

#### Nothing to Update:
- Value:
  - **Error**:
    - Description: true
    - Tags: String
  - **Error_message**:
    - Description: BAD_REQUEST
    - Tags: String
  - **User_message**:
    - Description: Nothing to update
    - Tags: String
- Tags: JSON

#### Invalid Card Token:
- Value:
  - **Error**:
    - Description: true
    - Tags: String
  - **Error_message**:
    - Description: BAD_REQUEST
    - Tags: String
  - ** user_message**:
    - Description: Invalid card token
    - Tags: String
- Tags: JSON
