# 2. Add Value/Commission

## Add Value/Commission Setting (Also updates the existing one)

<mark style="color:green;">`POST`</mark> `{{MemberBaseAddress}}/api/paywall/member/valuedate`

{% hint style="info" %}
**Important**: To be able to use the member service, you need to send the '**apikeypublic**' and '**apiclientpublic**' parameters in the 'Header' field.\
\
[<mark style="color:green;">**MemberAPI**</mark> ](https://developer.paywall.one/payment-orchestration-integration-document/environment)[<mark style="color:green;">**Address**</mark>](https://developer.paywall.one/payment-orchestration-integration-document/environment)
{% endhint %}

<table><thead><tr><th width="177">Parameter</th><th width="90">Type</th><th width="136">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="209">Parameter</th><th width="122">Type</th><th width="154">Compulsory</th><th width="336">Description</th></tr></thead><tbody><tr><td>MemberId</td><td>int</td><td>Yes</td><td>The member's ID information in Paywall.</td></tr><tr><td>CalculationType</td><td>int</td><td>Yes</td><td>Progress billing calculation type. You can access more detailed information from the system data field.</td></tr><tr><td>CalculationValue</td><td>int</td><td>Yes</td><td>Progress billing calculation value. You can access more detailed information from the system data field.</td></tr><tr><td>Commission</td><td>decimal</td><td>Yes</td><td>The commission value to be applied to the sub-member business during progress billing calculation.</td></tr></tbody></table>

**Sample to be sent to the service&#x20;**<mark style="color:green;">**JSON**</mark>**&#x20;and&#x20;**<mark style="color:green;">**sample codes**</mark>**&#x20;is as follows**

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

```json5
{
    "MemberId": 14,
    "CalculationType": 2, // ADayOfWeek - One day of the week
    "CalculationValue": 4, // Thursday of the week
    "Commission": 10 // Commission to be applied
}
```

{% 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 a value of '0'.</td></tr><tr><td>Result</td><td>bool</td><td>It returns a value of 'true' for success, and 'false' otherwise.</td></tr><tr><td>Message</td><td>string</td><td>If the transaction is unsuccessful, this is the error message specified, providing language support based on the 'locale' parameter.</td></tr><tr><td>Body</td><td>object</td><td>Transaction details information</td></tr></tbody></table>

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

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

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