# 5. Close Provision

## **Close Provision**

<mark style="color:green;">`POST`</mark> `{{Base Adres}}/api/paywall/apm/provision/close`

{% hint style="info" %}
**Important:** To use the APM Payment Close Provision service, you must include the **apikeypublic** and **apiclientpublic** parameters in the **Header** section.\
\
[<mark style="color:green;">**PaymentAPI Address**</mark>](https://developer.paywall.one/payment-orchestration-integration-document/environment)
{% endhint %}

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

<table><thead><tr><th width="221">Parameter</th><th width="121.6953125">Type</th><th width="155.88671875">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 (BODY) parameters that must be sent to the service are as follows:**

<table><thead><tr><th width="225">Parameter</th><th width="107">Type</th><th width="138.765625">Compulsory</th><th width="336">Description</th></tr></thead><tbody><tr><td>UniqueCode</td><td>string</td><td>Yes</td><td>This is the <strong>UniqueCode</strong> parameter related to the APM payment. It is included in the response returned by the API at the time of creation.</td></tr><tr><td>Amount</td><td>decimal</td><td>Yes</td><td>Provision amount</td></tr></tbody></table>

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

<table><thead><tr><th width="189">Parameter</th><th width="100.33333333333331">Type</th><th>Desciption</th></tr></thead><tbody><tr><td>ErrorCode</td><td>int</td><td>Error code. If the operation is successful, it returns a value of '0'.</td></tr><tr><td>Result</td><td>bool</td><td>Returns a value of <strong>true</strong> or <strong>false</strong>. If the operation is successful, it returns <strong>true</strong>.</td></tr><tr><td>Message</td><td>string</td><td>If the operation fails, this is the error message provided. It supports localization based on the <strong>locale</strong> parameter.</td></tr><tr><td>Body</td><td>object</td><td>If the operation fails, this is the detailed object related to the error.</td></tr></tbody></table>

```json
{
  "ErrorCodeType": 1,
  "ErrorMessage": null,
  "ErrorCode": 0,
  "Result": true,
  "Message": "",
  "Body": {
    "LinkModel": true,
    "ApmTransactionDate": "2025-07-18T17:15:08.753357",
    "UniqueCode": "4035eb60-62b6-4620-9e9b-8d9f15396814",
    "MerchantUniqueCode": "0e0e2885-961f-4685-9fb8-7ce306c07844",
    "TrackingCode": null,
    "Amount": 8.00,
    "ApmTransactionId": 14140,
    "KeyType": 8,
    "ApmProviderMessage": "Ödeme başarılı",
    "AcquirerProviderIcaNumber": null,
    "AcquirerIcaNumber": null,
    "RetrievalReferenceNumber": "",
    "AcquirerAuthorizationCode": "",
    "BankRetrievalReferenceNumber": "",
    "BankReferenceId": "",
    "AdditionalBankReferenceId": "",
    "AcquirerRetrievalNumber": ""
  }
}
```
