> For the complete documentation index, see [llms.txt](https://developer.paywall.one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.paywall.one/payment-orchestration-integration-document/card-storage-service/card-saving/5.-update-card.md).

# 5. Update Card

## Stored Card Update

<mark style="color:orange;">`PUT`</mark> `{{Base Adres}}/paywall/card`

Sending a request to the above endpoint is sufficient. You can use the *Base Address* for both Test and Production environments as needed.

{% hint style="info" %}
Important Card operations are high-security transactions. Therefore, you must send **'apikeyprivate'** and **'apiclientprivate'** parameters in the Header..\
\
[<mark style="color:green;">**CardWallAPI Address**</mark>](/payment-orchestration-integration-document/environment.md)
{% endhint %}

#### The parameters that must be sent to the service (HEADERS) are as follows:

<table><thead><tr><th width="162">Parameter</th><th width="99.20703125">Type</th><th width="137.25390625">Compulsory</th><th width="403">Description</th></tr></thead><tbody><tr><td>apikeyprivate</td><td>string</td><td>Yes</td><td>The Private Key you obtained from the merchant panel</td></tr><tr><td>apiclientprivate</td><td>string</td><td>Yes</td><td>The Private Client you obtained from the merchant panel</td></tr></tbody></table>

#### The parameters that must be sent to the service (BODY) are as follows:

<table><thead><tr><th width="226">Parameter</th><th width="91">Type</th><th width="145.046875">Compulsory</th><th>Description</th></tr></thead><tbody><tr><td>PartnerBased</td><td>bool</td><td>No</td><td>Valid for cards registered within the scope of Partnership</td></tr><tr><td>PartnerIdentity</td><td>string</td><td>Yes/No</td><td>Valid for cards registered within the scope of Partnership</td></tr><tr><td>RelationalId1</td><td>string</td><td>Yes</td><td>The unique information associated with the card</td></tr><tr><td>RelationalId2</td><td>string</td><td>No</td><td>The second unique information associated with the card</td></tr><tr><td>RelationalId3</td><td>string</td><td>No</td><td>The third unique information associated with the card</td></tr><tr><td>UniqueCode</td><td>string</td><td>Yes</td><td>The unique identifier (ID) of the stored card</td></tr><tr><td>Nickname</td><td>string</td><td>Yes</td><td>Alias name of the card (e.g., My high-limit card)</td></tr><tr><td>Month</td><td>int</td><td>Yes</td><td>Expiration month of the card to be updated</td></tr><tr><td>Year</td><td>int</td><td>Yes</td><td>Expiration year of the card to be updated</td></tr></tbody></table>

{% tabs %}
{% tab title="JSON" %}
{% code overflow="wrap" lineNumbers="true" %}

```json5
{
    "PartnerBased": false,
    "PartnerIdentity": "",
    "RelationalId1": "003",
    "RelationalId2": "004",
    "RelationalId3": "",
    "UniqueCode": "921245xQN85D0+Zuf7oAJv5@@@@@G86eN7RA4cX8L4hHo7Ma3hg7AW7Bq232yPyw2iVPkrt1qEw==",
    "Nickname": "Yurtdışı kartım",
    "Month": 12,
    "Year": 2030
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

**Servisten işlem sonrasında gönderilen cevap mesajına ait parametreler şu şekildedir :**

<table><thead><tr><th width="185.33333333333331">Parameter</th><th width="99.1015625">Type</th><th>Description</th></tr></thead><tbody><tr><td>ErrorCode</td><td>int</td><td>Indicates the result of the operation. Returns '0' if successful, otherwise '1'</td></tr><tr><td>Result</td><td>string</td><td>Returns 'true' if the operation is successful, otherwise 'false'</td></tr><tr><td>Message</td><td>string</td><td>Indicates the result message of the operation</td></tr><tr><td>Body</td><td>nesne</td><td>If the operation fails, this is the detail object related to the error</td></tr></tbody></table>

**Example Code:**

{% tabs %}
{% tab title="JSON" %}
{% code overflow="wrap" lineNumbers="true" %}

```json5
{
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": ""
}
```

{% endcode %}
{% endtab %}
{% endtabs %}
