# Getting Started - Technical Integration

### Technical Integration

For an Operator, the technical integration begins after [the Business Information](/hubconnect-operator-zone/getting-started.md) section is complete. The technical integration building consists of four stages, throughout which our team will review your submissions and provide assistance when needed.

#### The four stages of Technical Integration building:

1. [**Staging Configuration**](#staging-configuration-details)\
   This stage involves setting up the integration details for your testing environment. You’ll define the Wallet API type, supported currencies, Wallet endpoint, Server IPs, and Public Key.
2. [**Staging Tests**](#staging-tests)\
   Here, you’ll test the integration in the staging environment. Hub88’s team will support you throughout the process, and you’ll be able to provide credentials for our team to assist in testing your setup.
3. [**Production Configuration**](#production-configurations)\
   In this stage, you’ll submit the details for your live production environment. You’ll choose the Wallet API type, supported currencies, Wallet endpoint, Server IPs, and Public Key.
4. [**Production Tests**](#production-tests)\
   Finally, you’ll perform integration testing in the production environment with Hub88’s assistance. Once the tests are approved, your integration will be complete. You'll be able to go live with the help of your Account Manager.

***

### Staging Configuration details

***

In the **Staging Configuration** section, you will need to provide the following information:

**General Settings**:

* You'll need to pick whether your integration is **Seamless Wallet** or **Transfer Wallet**.
  * Seamless Wallet (preferred)
  * Transfer Wallet
* **Supported Currencies -** Specify which currencies will be supported in your integration.
* **Chat Channel Preference -** Select which chat channel you'd prefer to have set up with Hub88 tech team. You'll be later able to see under Technical Integration Support all the details around chat channel.&#x20;

**Integration Details**:

* **Wallet Endpoint -** Provide the full URL of your Wallet endpoint (e.g., `https://wallet.test-myc.io`).
* **Server IPs -** Add all IPs you wish to use. These will be whitelisted on our side.
* **Public Key -** This key will be used by Hub88 to verify Games API requests, one of our core APIs. For more information, see **Requests signing logic for Operator API**.

To generate **a private / public key pair** on **your side**, run the following commands:

* `openssl genrsa -out private.pem 2048`
* `openssl rsa -pubout -in private.pem -out public.pem`

{% @mermaid/diagram content="sequenceDiagram
Hub88->>Operator: Hub88 sends its public key\
Operator->>Hub88: Operator sends public key" %}

Once you've submitted Staging Configuration details, and they have been approved by Hub88's team, you'll be able to see **technical details** under **the Integration Details tab** for both staging and production environments. At first, **Staging environment details** will be available, and you'll be able to see:&#x20;

* **Operator ID(s)** for all your brands' connections. In case you are using multiple regions and brands, all connections will have separate Operator IDs.
* **Hub88s IPs** from where Hub88's API calls originate from. Note that you'll need to whitelist those IPs in case you are using a firewall.
* Quick-links to get you started.

{% hint style="info" %}
When integrating **Seamless Wallet**, start by prioritising the [Games API](/developer-docs/operator-api-reference/games-api.md#games-api-reference) and [Wallet API](/developer-docs/operator-api-reference/wallet-api.md#wallet-api-reference) as they are essential for completing the integration. You can add additional functionality later with the [Recommendations API](/developer-docs/operator-api-reference/recommendations-api.md) and [Freebets API](/developer-docs/operator-api-reference/freebets-api.md). For an overview of the integration flow, check the [Operator API Overview](/developer-docs/operator-api-reference/operator-api-overview.md) and [Core API Flow](/developer-docs/hub88-apis/core-api-flow.md) guides.
{% endhint %}

***

### **Staging Tests**&#x20;

***

In the **Staging Test** section, you'll be able to run tests for your staging environment, and provide credentials for Hub88 team to your side.&#x20;

**Test Configuration**

Tests for your staging environment's integration consist of maximum 27 different test which you can choose from. For the configuration, you'll need to provide:

* Configuration Name (*required)*
* API Endpoint URL (*required)* - Your player's wallet endpoint URL  (web server's URL) which will be called similar to regular game plays.
* Currency (*required)*
* Token (*required)*
* User (*required)*

You can move forward and submit the info in this stage, when all the test you've selected have been passed.&#x20;

**Website Credentials**

Here, you can add the credentials for Hub88's team to enter your staging environment, to assist you in checking that the integration works properly. We'll ask for:&#x20;

* Website URL (*required) -* Full URL for your casino site or staging site.&#x20;
* Login Username (*required) -* Ensure that the account has been set up and the credentials are accepted.&#x20;
* Login Password (*required)*

***

### **Production Configurations**

***

Once the staging environment stages have passed all checks, you can proceed with building your integration in production. The process from this point onwards mirrors the steps you took during the staging setup.

You will need to specify your production environment details as follows for each Brand:

**General Settings:**

* **Integration Type** – Seamless Wallet or Transfer Wallet
* **Supported Currencies** – Specify which currencies will be supported in your integration.

**Integration Details:**

* **Sites** – The URLs of your casino sites under the same Brand. These URLs will share the same connection and will become the Subpartner IDs.
* **Operating Regions** – Select one or multiple operating regions. **Note** that each region will require building a **separate** API integration, as the regions have separate API base URLs and Operator IDs you'll need to send. See more in Request URLs.
* **Wallet Endpoint** – Provide the full URL of your Wallet endpoint (e.g., <https://wallet.test-myc.io>).
* **Server IPs** – Add all IPs you wish to use. These will be whitelisted on our side.
* **Public Key** – This key will be used by Hub88 to verify Games API requests, one of our core APIs. For more information, see **Request Signing Logic for Operator API**.

Once you've submitted your Production Configuration, in the **Integration Details tab,** Production environment details will become available. You'll be able to see:&#x20;

* **Operator ID(s)** for all your brands' connections.&#x20;
* **Sites** (Subpartner IDs) for all your brands' sites.&#x20;
* **Hub88 Public Key**
* **Hub88s IPs** from where Hub88's API calls originate from. Note that you'll need to whitelist those IPs in case you are using a firewall.
* Quick-links to key resources.

{% hint style="info" %}
When integrating **Seamless Wallet**, start by prioritising the [Games API](/developer-docs/operator-api-reference/games-api.md#games-api-reference) and [Wallet API](/developer-docs/operator-api-reference/wallet-api.md#wallet-api-reference) as they are essential for completing the integration. You can add additional functionality later with the [Recommendations API](/developer-docs/operator-api-reference/recommendations-api.md) and [Freebets API](/developer-docs/operator-api-reference/freebets-api.md). For an overview of the integration flow, check the [Operator API Overview](/developer-docs/operator-api-reference/operator-api-overview.md) and [Core API Flow](/developer-docs/hub88-apis/core-api-flow.md) guides.
{% endhint %}

***

### **Production Tests**

***

After completing the Production Configuration, your integration must pass up to 27 tests, similar to the Staging Tests. For each configuration, you'll need to provide the following details:

* Configuration Name (*required)*
* API Endpoint URL (*required)*
* Currency (*required)*
* Token (*required)*
* User (*required)*

You can proceed once all selected tests have passed.

**Website Credentials**

Here, you can add credentials for the Hub88 team to access your production environment and help verify the integration works correctly.&#x20;

We'll ask for:&#x20;

* Website URL (*required) -* Full URL for your casino site.&#x20;
* Login Username (*required) -* Ensure that the account has been set up and the credentials are accepted.&#x20;
* Login Password (*required)*

***

### Request signing logic for Operator API&#x20;

***

The body of all requests will be signed with `RSA-SHA256` using the respective private key and encoded to BASE64.  The signature will be placed in the `X-Hub88-Signature` header.&#x20;

{% hint style="info" %}
To validate the signature, use the `X-Hub88-Signature` along with the raw payload/request body without any deserialization, unmarshalling, or decoding.
{% endhint %}

<figure><img src="/files/z2V77gzcBTwyo59nf8RB" alt=""><figcaption><p>Request signing for Operator API</p></figcaption></figure>

* **Games API**&#x20;
  * All **Games API** requests have to be signed by Operator.&#x20;
  * Hub88 verifies all **Games API** requests using the public key provided by the Operator.
* **Wallet API**
  * All **Wallet API** requests have to be signed by Hub88.&#x20;
  * The Operator needs to verify all **Wallet API** requests using the public key provided by Hub88.
* All **TransferWallet** API requests must be signed by the Operator.

We have [code examples](https://github.com/coingaming/Hub88-Examples/blob/master/README.md) in a few programming languages, to get you started.&#x20;

{% hint style="info" %}
**X-Hub88-Signature error:**

Ensure the X-Hub88-Signature has no whitespaces or beautifiers. The signature must match the body exactly—any difference will result in an "invalid signature" error.
{% endhint %}

**Example:**

{% code title="Request body:" overflow="wrap" %}

```json
{"user":"3nYTOSjdlF6UTz9Ir","country":"XX","currency":"EUR","operator_id":1,"token":"cd6bd8560f3bb8f84325152101adeb45","platform":"GPL_DESKTOP","game_code":"clt_dragonrising","lang":"en","lobby_url":"https://examplecasino.io","ip":"::ffff:10.0.0.39"}
```

{% endcode %}

* Private key example for signing the example request [here](https://raw.githubusercontent.com/coingaming/Hub88-Examples/master/priv/private.pem).

{% code title="Signature example:" overflow="wrap" %}

```
DYKK0KsSMayoyHcpFx32R57mZ8ey2r8U4RscT9LiWEFkd40V/f2n9JafsC+yuB8OSHz+wdCvyxvqacNiL8r3ZGEBdTL4lrcjdM5PWHQu8auYNp2mGE0tbX6/KGyk8nyQ3+h1HogIHj5hnMNYx0r+AhFT2tD/IT2b3Pq6oDPNL8rK0CbDCm8w7+gal1i0T1pDo61e2CTDTHpfm4ELEKcff2iiIRvgQ52nUCkuxQjCN/BGyEC1il0AVwlcb8CKU6Utg48UqvPLqu38qahI5X53zBMpLFIOtOYcFoepWmHvBxh0GDM4NIfQQ3Cm5sFyN3AsqzM7rqA0N9VZP0QPK8fA0g==
```

{% endcode %}

### Request consistency&#x20;

**Wallet API** requests have to be idempotent. All transactions contain a `transaction_uuid` field. The Operator has to ensure that requests with the same `transaction_uuid` are not processed twice, while the response has to be the same for all duplicate requests. The operator may ignore the idempotency requirement for the `/user/balance` call.


---

# 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.hub88.io/developer-docs/operator-api-reference/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.
