# Getting Started

The Disputes API provides direct access to dispute data and management tools, enabling you to handle the complete lifecycle of payment dispute cases. Use this API to retrieve dispute information, monitor case status, and submit responses with supporting documentation.

{% hint style="warning" %}
All API requests must be authenticated using an Access Key and Bearer Token—secure credentials issued by Xplor Pay.
{% endhint %}

### Environments <a href="#sandbox-environment" id="sandbox-environment"></a>

Use these two environments:

* **Integration (INT)** — for building and validating your integration
* **Production (live)** — for managing live dispute cases

Both environments accept authenticated JSON requests over HTTPS using secure HTTP methods and headers.

{% hint style="warning" %}
All new software partners will be onboarded to the INT environment. The current legacy sandbox environment will be retired on 31 March 2026.
{% endhint %}

#### Integration environment <a href="#sandbox-environment" id="sandbox-environment"></a>

Use the integration environment to test your API implementation before going live. This environment simulates real API behavior for functional testing.

* Set the base URL to: `https://horizon-service-int.clearent.net/`
* Include your sandbox `AccessKey` and `MerchantId` in the request header.
* Include a valid Bearer Token from the Edge service.
* All requests must use secure HTTPS and JSON format.

#### Production environment <a href="#production-environment" id="production-environment"></a>

Use the Production environment when your integration is ready for live dispute management.

* Set the base URL to: `https://horizon-service.clearent.net/`
* Include your production `AccessKey` and `MerchantId` in the request header.
* Include a valid Bearer Token from the Edge service.
* All requests must use secure HTTPS and JSON format.

### Authentication <a href="#authentication" id="authentication"></a>

To authenticate with our API endpoints, add following fields in an HTTP header of your request:

{% code lineNumbers="true" %}

```http
Content-Type: application/json
Accept: application/json
AccessKey: Secret access key issued by Xplor Pay
MerchantId: Unique identifier for the merchant
```

{% endcode %}

The following table describes the required fields in an HTTP header:

<table><thead><tr><th width="134">Name</th><th width="112">Data type</th><th width="109">Required?</th><th>Description</th></tr></thead><tbody><tr><td><code>Content-Type</code></td><td>String</td><td>Required</td><td>The media type of the request body. Use <code>application/json</code>.</td></tr><tr><td><code>Accept</code></td><td>String</td><td>Required</td><td>The expected response format. Use <code>application/json</code>.</td></tr><tr><td><code>AccessKey</code></td><td>String</td><td>Required</td><td><p>The secret access key issued by Xplor Pay for authenticating API requests.</p><p>Replace<code>Secret access key issued by Xplor Pay</code> with your actual API access key.</p></td></tr><tr><td><code>MerchantId</code></td><td>String</td><td>Required</td><td>Unique identifier for the merchant whose disputes you want to access.</td></tr></tbody></table>

#### Access Token requirements

All API requests require an access token obtained from the Edge service. Include the `MerchantId` in the token request to authorize access for that merchant.

<table><thead><tr><th width="165">Requirement</th><th>Details</th></tr></thead><tbody><tr><td>Token Type</td><td>Bearer token with claim <code>tgt_hnk</code> (Targeted Hierarchy Node Key) represent the merchant.</td></tr><tr><td>Token Request</td><td>Include <code>MerchantId</code> or <code>caseNumber</code> in the request header as per necessity.</td></tr></tbody></table>

{% hint style="warning" %}
The `/MerchantDisputes` endpoint filters disputes based on the `MerchantNumber` extracted from the `tgt_hnk` claim in the access token.
{% endhint %}

### **Obtain Access Key**

To obtain an access key:

{% stepper %}
{% step %}

#### **Request sandbox credentials**&#xD;

This key allows you to build, test, and validate your API integration safely in the INT environment.

{% hint style="info" %}
Contact [Xplor Pay Integration Support](https://xplorpay.com/getting-started/) team to request an Access Key.
{% endhint %}
{% endstep %}

{% step %}

#### **Complete testing and certification**

After your integration is validated and approved, Xplor Pay issues a production Access Key.
{% endstep %}

{% step %}

#### **Receive production credentials**

You’ll receive an Access Key to go live using production environment.

{% hint style="warning" %}
Keep this key secure — it should never be shared or exposed publicly.
{% endhint %}
{% endstep %}
{% endstepper %}

* [Disputes Management](/api-reference/api/disputes/disputes-management.md)


---

# 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://docs.xplorpay.com/api-reference/api/disputes/getting-started.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.
