# 1. Add

## Add Card to Blacklist

<mark style="color:green;">`POST`</mark> `{{Base Adres}}/paywall/blacklist/card`

{% hint style="info" %}
Important: Card operations are high-security transactions. Therefore, you must send the 'apikeyprivate' and 'apiclientprivate' parameters in the 'Header' field.\
\
[<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="119.28125">Type</th><th width="148.796875">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="244">Parameter</th><th width="92">Type</th><th width="127">Compulsory</th><th width="336">Description</th></tr></thead><tbody><tr><td>PartnerBased</td><td>bool</td><td>No</td><td>It should be used if the cards will be stored in a shared pool within the scope of Partnership management.</td></tr><tr><td>PartnerIdentity</td><td>string</td><td>Yes/No</td><td>If it will be registered within the scope of Partnership, the identity information of your Partner account.</td></tr><tr><td>RelationalId1</td><td>string</td><td>Yes</td><td>The unique information to which the card is requested to be linked.</td></tr><tr><td>RelationalId2</td><td>string</td><td>No</td><td>The second unique piece of information to which the card is requested to be linked (all information must be provided during listing).</td></tr><tr><td>RelationalId3</td><td>string</td><td>No</td><td>The third unique piece of information to which the card is requested to be linked (all information must be provided during listing).</td></tr><tr><td>CardNumber</td><td>string</td><td>Yes</td><td>The card number to be added to the blacklist.</td></tr><tr><td>IsSavedCard</td><td>bool</td><td>Yes/No</td><td>It should be sent as <strong>true</strong> if the process will proceed using a stored card.</td></tr><tr><td>UniqueCode</td><td>string</td><td>Yes/No</td><td>It is the identity information of the stored card.</td></tr></tbody></table>

**A sample JSON file to be sent to the service is as follows:**

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

```json5
{
    "PartnerBased": false,
    "PartnerIdentity": "e00fee4d-304f-4038-bf25-d31ee53856a9",
    "RelationalId1": "test1111",
    "RelationalId2": null,
    "RelationalId3": null,
    "IsSavedCard": true,
    "UniqueCode": "mfUpwRXYvgxCy2n4aGWT+ygqQ==",
    "CardNumber": ""
}
```

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

**The parameters returned from the service are as follows:**

<table><thead><tr><th width="189">Parameter</th><th width="100.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>ErrorCode</td><td>int</td><td>Error code. Returns '0' if the operation is successful.</td></tr><tr><td>Result</td><td>bool</td><td>Returns a true or false value. If the operation is successful, it returns 'true'.</td></tr><tr><td>Message</td><td>string</td><td>If the operation fails, this is the message describing the error and provides language support based on the locale parameter.</td></tr><tr><td>Body</td><td>object</td><td>If the operation fails, this is the detail object related to the error.</td></tr></tbody></table>

{% tabs %}
{% tab title="✅ Successful" %}
{% code lineNumbers="true" %}

```json
{
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": {
        "Id": "b49f1ed8-eef7-4215-8bbb-55451fdc03ff"
    }
}
```

{% endcode %}
{% endtab %}

{% tab title="❌ Failed" %}
{% code lineNumbers="true" %}

```json
{
    "ErrorCode": 4,
    "Result": false,
    "Message": "Card already in Blacklist",
    "Body": null
}
```

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.paywall.one/payment-orchestration-integration-document/card-storage-service/blacklist/1.-add.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
