# Custodex

Integration with **Custodex** allows the provider to be used in two modes:

1. **Merchant (payment acceptance)** — automatic crediting of funds from clients
2. **Auto-payout module (payouts)** — automatic sending of funds to the client

➡️ By combining these modes, you can build **fully automatic exchange directions**.

### 📌 Integration features

* Accepting cryptocurrencies through Custodex (merchant)
* Automatic payouts (payout)
* Support for a large list of networks and tokens
* A single key system for all modules
* Ability to work without creating separate accounts
* Support for fiat payouts (EUR, USD, CNY, RUB) through conversion (optional)

### 🔑 Getting API keys

#### Step 1. Registration

Go to the Custodex website:\
<https://custodex.sv/ru>

Create an account and complete the basic setup.

#### Step 2. Getting the keys

Go to:

**Settings → Integrations**

You will receive:

* **Public key**
* **Private key**

<figure><img src="/files/f2336676bbcf1b52820f507354726d9e5141d26e" alt=""><figcaption></figcaption></figure>

⚠️ These keys are used:

* for both **merchant**
* for both **auto-payouts**

### 🆔 Getting the merchant UUID (account ID)

In Lara Script, this field is used later as:

```
Merchant UUID
```

#### How to get it:

1. Go to Custodex:\
   **Accounts → Create account**
2. Specify a name
3. Confirm via 2FA
4. After creation:
   * use **account ID** as `Merchant UUID`

<figure><img src="/files/178da0ad6ddb1ed3fbf90194587374569f3634aa" alt=""><figcaption></figcaption></figure>

#### ❗ Important note

Creating an account **is not required**.

If you do not create an account:

* all funds will be credited to the **main account balance**
* field `Merchant UUID` can be left blank; it works for both merchant and auto-payouts

## ⚙️ Setup in Lara Script

### 1. Connecting the merchant

Go to:

**Admin panel → Merchants**

Select the Custodex merchant:

#### Fill in the fields:

* **Public key**
* **Private key**
* **Merchant UUID** *(optional)*

Save the changes.

<figure><img src="/files/9PNPo3lo9cohltU2SwCM" alt=""><figcaption></figcaption></figure>

### 🪙 Currency setup

After connecting, it is necessary to configure currencies.

Go to:

**General → Currencies**

#### 📌 Main rule

The ticker must **strictly match** the ticker in Custodex.

Examples:

* `USDTTRC`
* `USDCARB`
* `BTC`
* `ETHBSC`

#### ❗ Important

* **DO NOT use the "Merchant network" field**
* All logic is determined **by the ticker**

### 🔄 Setting up exchange directions

Go to:

**Admin panel → Exchange directions**

For the required direction or currency:

#### Specify:

* **Merchant:** Custodex

### ✅ Result

After setting up the merchant and the auto-payout module:

* An order is created, and an address is generated for the client to pay
* The client sends funds → Custodex records the payment
* Lara Script receives a notification → the order is confirmed
* The payout is automatically performed through Custodex

➡️ It turns out **a fully automatic direction**

**Read about how to configure Custodex as an auto-payout module** [**here.**](https://lara-script.gitbook.io/docs/admin-panel-functionality/general/auto-withdrawals/custodex)


---

# 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://lara-script.gitbook.io/docs/admin-panel-functionality/merchants/custodex.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.
