> For the complete documentation index, see [llms.txt](https://docs.xplorpay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xplorpay.com/api-reference/webhooks/working-with-webhooks/equipment-tracking-and-activation-webhooks/equipment-activation.md).

# Equipment Activation

The **Equipment Activation webhook** enables payment terminal activation for merchants. It allows clients to notify the `activations-service` when terminal activations are ready for processing. The service then forwards API keys to the merchant endpoint.

### Endpoint details

<table data-search="true"><thead><tr><th width="197" valign="top">Item</th><th valign="top">Value</th></tr></thead><tbody><tr><td valign="top">Service</td><td valign="top"><code>activations-service</code></td></tr><tr><td valign="top">HTTP Method</td><td valign="top"><code>POST</code></td></tr><tr><td valign="top">URL Path</td><td valign="top"><code>/activations/{merchantId}/callback</code></td></tr><tr><td valign="top">Parameters</td><td valign="top"><code>merchantId (URL parameter)</code></td></tr></tbody></table>

### Request format

The endpoint accepts a request with the following components:

* `merchantId` as a URL parameter
* JSON body containing an external identifier

The following example shows the request body:

{% code lineNumbers="true" %}

```json
{
  "externalId": "12345"
}
```

{% endcode %}

{% hint style="warning" %}
The `externalId` typically originates in the Partner Portal.
{% endhint %}

### Process flow

When the service receives a callback request, it:

1. Validates that an equipment order exists for the specified `merchantId`.
2. Retrieves the merchant URL for the given `merchantId`.
   1. If no merchant URL is found, it returns the parent HNK URL.
3. Forwards API keys for terminals in the placed order to the merchant URL.
4. Records the callback in the `ActivationDetails` table of the Equipment database.

### Callback to merchant

The service sends a POST request to the merchant URL with API keys for each terminal in the order. The following example shows the payload:

{% code lineNumbers="true" %}

```json
{
    "externalIdentifier": "12345",
    "merchantAccountNumber": "6588000001234567",
    "keys": [
    {
       "type": "cnp",
       "productName": "Pi Technologies (ASeries)",
       "apiKey": "abc16ed42a9a99dd1f7890e4f00",
       "terminalid": "80608483",
       "publicKey": "301406072a8648ce3d0201060....459a12d5780d65e5a7a624a4ca005"
    }
 ]
}
```

{% endcode %}

### Response codes

<table><thead><tr><th width="146.5999755859375" valign="top">Status Code</th><th width="107.199951171875" valign="top">Meaning</th><th valign="top">Description</th></tr></thead><tbody><tr><td valign="top"><code>200</code> (OK)</td><td valign="top">Success</td><td valign="top">The activation process completed successfully. No response payload is returned.</td></tr><tr><td valign="top"><code>424</code> (Failed Dependency)</td><td valign="top">Failure</td><td valign="top">The activation process failed. No response payload is returned.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.xplorpay.com/api-reference/webhooks/working-with-webhooks/equipment-tracking-and-activation-webhooks/equipment-activation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
