# 2. Add Card

## Add New Card to Recurring Payment Scope

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

{% hint style="info" %}
**Important**: In order to use the payment service, you need to send '**apikeypublic**' and '**apiclientpublic**' parameters in the 'Header' field.\
\
[<mark style="color:green;">**PaymentAPI Address**</mark>](/payment-orchestration-integration-document/environment.md)
{% endhint %}

{% hint style="warning" %}
Only one registered card can be added to the same recurring payment membership. When you try to add the same card again, Paywall will return a warning message.
{% endhint %}

<table><thead><tr><th width="162">Parameter</th><th width="79">Type</th><th width="127">Compulsory</th><th width="403"> Description</th></tr></thead><tbody><tr><td>apikeypublic</td><td>string</td><td>Yes</td><td>The Public Key obtained from the merchant panel.</td></tr><tr><td>apiclientpublic</td><td>string</td><td>Yes</td><td>The Public Client obtained from the merchant panel.</td></tr></tbody></table>

**The parameters that need to be sent to the service are as follows:**

<table><thead><tr><th width="180">Parameter</th><th width="112">Type</th><th width="130">Compulsory</th><th width="336">Description</th></tr></thead><tbody><tr><td>SubscriptionId</td><td>int</td><td>Yes</td><td>Returned by Paywall during recurring payment membership creation.</td></tr><tr><td>UniqueCode</td><td>string</td><td>Yes</td><td>The UniqueCode information of the saved card where payments will be taken, returned by Paywall during card registration and listing.</td></tr></tbody></table>

**Sample to be sent for service&#x20;**<mark style="color:green;">**JSON**</mark>**&#x20;and&#x20;**<mark style="color:green;">**example codes**</mark>**&#x20;Sample to be sent for service**

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

```json5
{
    "SubscriptionId": 44,
    "UniqueCode": "FB98tsxFA4zFhbATX0uLmBIZi3P7xa+=="
}
```

{% endcode %}
{% endtab %}

{% tab title="C#" %}

```csharp
// Soon
```

{% endtab %}

{% tab title="GO" %}

```go
// Soon
```

{% endtab %}

{% tab title="Java" %}

```java
// Soon
```

{% endtab %}

{% tab title="PHP" %}

```php
// Soon
```

{% endtab %}

{% tab title="Python" %}

```python
// Soon
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
// Soon
```

{% endtab %}

{% tab title="TypeScript" %}

```typescript
// Soon
```

{% endtab %}

{% tab title="Curl" %}

```sh
// Soon
```

{% 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. If the transaction is successful, it returns '0'.</td></tr><tr><td>Result</td><td>bool</td><td>It returns either true or false. If the transaction is successful, it returns 'true'.</td></tr><tr><td>Message</td><td>string</td><td>If the transaction is unsuccessful, this is the specified error message.</td></tr><tr><td>Body</td><td>object</td><td><em>No details returned.</em></td></tr></tbody></table>

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

```json
{
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "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/recurring-payment/8.-recurring-payment-card/2.-add-card.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.
