> 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/reconciliation-service/virtual-pos/1.-perform-reconciliation.md).

# 1. Perform Reconciliation

## Perform Reconciliation

<mark style="color:green;">`POST`</mark> `{{Base Address}}/api/paywall/private/vpos/reconciliation/reconcile`

{% hint style="info" %}
**Important:** To use the **Perform Reconciliation** service, you must include the **apikeyprivate** and **apiclientprivate** parameters in the **Header**.

\
[<mark style="color:green;">**PaymentPrivateAPI Address**</mark>](/payment-orchestration-integration-document/environment.md)
{% endhint %}

<table><thead><tr><th width="182">Parameter</th><th width="106.33333333333331">Type</th><th width="137.140625">Compolsory</th><th>Description</th></tr></thead><tbody><tr><td>apikeyprivate</td><td>string</td><td>Yes</td><td>The <strong>Private Key</strong> obtained from the merchant panel.</td></tr><tr><td>apiclientprivate</td><td>string</td><td>Yes</td><td>The <strong>Private Client</strong> obtained from the merchant panel.</td></tr></tbody></table>

{% hint style="info" %}
Daily reconciliation can be performed after **00:30 (midnight)** of the following day.

**Example:** The reconciliation for **06.06.2024** can be performed after **07.06.2024 00:30**.
{% endhint %}

{% hint style="info" %}
Once a reconciliation request is successfully completed, another reconciliation request for the same day cannot be submitted. If the reconciliation fails, a new request for the same day can be submitted with different values.
{% endhint %}

#### The parameters to be sent to the service are as follows:

<table><thead><tr><th width="228">Parameter</th><th width="106">Type</th><th width="175">Compolsory</th><th>Description</th></tr></thead><tbody><tr><td>Date</td><td>Date</td><td>Yes</td><td><strong>Reconciliation date in </strong><mark style="color:yellow;"><strong>yyyy-MM-dd</strong></mark><strong> format</strong></td></tr><tr><td>TotalCount</td><td>int</td><td>Yes</td><td>Total number of transactions in your system</td></tr><tr><td>TotalAmount</td><td>decimal</td><td>Yes</td><td>Total transaction amount in your system</td></tr><tr><td>SuccessfulCount</td><td>int</td><td>Yes</td><td>Total number of <mark style="color:green;">successful</mark> transactions in your system</td></tr><tr><td>SuccessfulAmount</td><td>decimal</td><td>Yes</td><td>Total amount of <mark style="color:green;">successful</mark> transactions in your system</td></tr><tr><td>UnsuccessfulCount</td><td>int</td><td>Yes</td><td>Total number of <mark style="color:red;">failed</mark> transactions in your system</td></tr><tr><td>UnsuccessfulAmount</td><td>decimal</td><td>Yes</td><td>Total amount of <mark style="color:red;">failed</mark> transactions in your system</td></tr><tr><td>RefundCount</td><td>int</td><td>Yes</td><td>Total number of <mark style="color:orange;">refunds</mark> in your system</td></tr><tr><td>RefundAmount</td><td>decimal</td><td>Yes</td><td>Total <mark style="color:orange;">refund</mark> amount in your system</td></tr><tr><td>PartialRefundCount</td><td>int</td><td>Yes</td><td>Total number of partial <mark style="color:orange;">refunds</mark> in your system</td></tr><tr><td>PartialRefundAmount</td><td>decimal</td><td>Yes</td><td>Total amount of <mark style="color:orange;">partial refunds</mark> in your system</td></tr><tr><td>CancelCount</td><td>int</td><td>Yes</td><td>Total number of <mark style="color:orange;">cancellations</mark> in your system</td></tr><tr><td>CancelAmount</td><td>decimal</td><td>Yes</td><td>Total <mark style="color:orange;">cancellation</mark> amount in your system</td></tr></tbody></table>

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

```json5
{
    "Date": "2024-05-07",
    "TotalCount": 4,
    "TotalAmount": 46.00,
    "SuccessfulCount": 0,
    "SuccessfulAmount": 0.00,
    "UnsuccessfulCount": 1,
    "UnsuccessfulAmount": 13.00,
    "RefundCount": 0,
    "RefundAmount": 0.00,
    "PartialRefundCount": 0,
    "PartialRefundAmount": 0.00,
    "CancelCount": 0,
    "CancelAmount": 0.00
}
```

{% 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 %}

**Response returned from the service:**

<table><thead><tr><th width="156">Parameter</th><th width="83.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>Body</td><td>object</td><td>Detailed information about the reconciliation process is returned. You can create your objects using the information below</td></tr><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 true or false. If the operation is successful, it returns true</td></tr><tr><td>Message</td><td>string</td><td>If the operation fails, it returns the relevant error message and provides language support based on the locale parameter</td></tr></tbody></table>

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

```json5
{
    "ErrorCode": 0,
    "Result": true,
    "Message": "Reconciliation result is success",
    "Body": {
        "IsReconciled": true,
        "IsSaved": true,
        "ExistsReconciliation": false,
        "OperationDateTime": "2024-06-07T20:11:55.3150056+03:00",
        "ReconciliationDate": "2024-06-07T20:11:55.3160313+03:00",
        "Merchant": {
            "TotalCount": 4,
            "TotalAmount": 46.00,
            "SuccessfulCount": 0,
            "SuccessfulAmount": 0.00,
            "UnsuccessfulCount": 1,
            "UnsuccessfulAmount": 13.00,
            "RefundCount": 0,
            "RefundAmount": 0.00,
            "PartialRefundCount": 0,
            "PartialRefundAmount": 0.00,
            "CancelCount": 0,
            "CancelAmount": 0.00
        },
        "Paywall": {
            "EndOfDayId": 3417,
            "TotalCount": 4,
            "TotalAmount": 46.00,
            "SuccessfulCount": 0,
            "SuccessfulAmount": 0.00,
            "UnsuccessfulCount": 1,
            "UnsuccessfulAmount": 13.00,
            "RefundCount": 0,
            "RefundAmount": 0.00,
            "PartialRefundCount": 0,
            "PartialRefundAmount": 0.00,
            "CancelCount": 0,
            "CancelAmount": 0.00
        }
    }
}
```

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