# Getting Started

The **Payments APIs** enable you to process transactions across multiple payment methods, including cards, terminal, ACH, mobile, batches, recurring payments, and gateway settings.

{% hint style="warning" %}
All API requests must be authenticated using an API Key—a secure credential 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 processing live onboarding requests.

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://gateway-int.clearent.net`
* Include your sandbox API Key in the request header.
* All requests must use HTTPS and JSON format.

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

Use the production environment when your integration is ready to process live transactions.

* Set the base URL to: `https://gateway.clearent.net`
* Include your production API Key in the request header.
* Use HTTPS and JSON for all production requests.

### 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 or application/xml
Accept: application/json or application/xml
API-Key: Secret API key issued by Xplor Pay
```

{% 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> or <code>application/xml</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> or <code>application/xml</code>.</td></tr><tr><td><code>API-Key</code></td><td>String</td><td>Required</td><td><p>The secret API key issued by Xplor Pay for authenticating API requests.</p><p>Replace<code>Secret API key issued by Xplor Pay</code> with your actual API key.</p></td></tr></tbody></table>

{% hint style="warning" %}
You may include additional authentication fields, such as `Mobilejwt` or `Achmobilejwt`, depending on the payment method used.
{% endhint %}

### **Obtaining API Key**

To obtain API key:

{% stepper %}
{% step %}

#### **Request sandbox credentials**

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 API Key.
{% endhint %}
{% endstep %}

{% step %}

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

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

{% step %}

#### **Receive production credentials**

You’ll receive an API 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 %}


---

# 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/payments/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.
