> 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/alternative-methods-apm/9.-complete-payment.md).

# 9. Complete Payment

## Complete Payment

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

{% hint style="info" %}
Important To use the Disconnect service you must include the apikeypublic and apiclientpublic parameters in the Header\
\
[<mark style="color:green;">**PaymentAPI Address**</mark>](/payment-orchestration-integration-document/environment.md)
{% endhint %}

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

<table><thead><tr><th width="183.6953125">Parameter</th><th width="96.6015625">Type</th><th width="145.98046875">Compolsory</th><th width="403">Description</th></tr></thead><tbody><tr><td>apikeypublic</td><td>string</td><td>Yes</td><td>Public Key obtained from the merchant panel</td></tr><tr><td>apiclientpublic</td><td>string</td><td>Yes</td><td>Public Client obtained from the merchant panel</td></tr></tbody></table>

**The BODY parameters to be sent to the service are as follows**

<table><thead><tr><th width="183">Parameter</th><th width="107">Type</th><th width="141">Compulsory</th><th width="336">Description</th></tr></thead><tbody><tr><td>UniqueCode</td><td>string</td><td>Yes</td><td>It is included in the response object returned by our services at the time of payment initiation</td></tr></tbody></table>

{% tabs %}
{% tab title="JSON" %}

```json
{
    "UniqueCode": "5b67dcde-dcaa-472e-9df9-e03faa25936c"
}
```

{% 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 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 this is the message describing the error with language support based on the locale parameter</td></tr><tr><td>Body</td><td>object</td><td>If the operation fails this is the error detail object</td></tr></tbody></table>

{% tabs %}
{% tab title="JSON" %}

```json
{
  "ErrorCodeType": 1,
  "ErrorMessage": null,
  "ErrorCode": 0,
  "Result": true,
  "Message": "",
  "Body": {
    "ApmKey": "Masterpass_IFrame",
    "ApmConnectionId": 1234,
    "ApmTransactionId": 12345,
    "UniqueCode": "ee05a111-652e-43c5-bb2b-a98a5ea3adbc",
    "MerchantUniqueCode": "441b3aa2-95f2-4bdd-a243-4b7ced8887f",
    "Amount": 400.12,
    "ProviderDummyResponse": {
      "ErrorCode": 0,
      "Body": "",
      "HttpCode": 200
    }
  }
}
```

{% endtab %}
{% endtabs %}
