# Important Concepts

#### **Base URL**

All API requests are made to the following base URL:

```
https://api.tylt.money/
```

Each API request should append the appropriate endpoint to this base URL. For example, for creating a Pay-In request, the endpoint `/transactions/merchant/createPayinRequest` would be appended to the base URL.

#### **BaseCurrency and SettledCurrency in Pay-In Requests**

The **baseCurrency** represents the currency in which the merchant expects to receive the payment, while the **settledCurrency** refers to the currency in which the transaction is processed and settled.

***

**Example 1:**

A merchant sells a pair of shoes on an e-commerce website, priced at $100. The merchant accepts payments in cryptocurrency, and the customer chooses to pay using DAI.

* **baseCurrency**: USD (the currency the merchant prices the shoes in)
* **settledCurrency**: DAI (on Binance Smart Chain or another supported network)

In this case, the merchant expects $100 in USD, but the transaction will be processed in DAI on the BSC network. The merchant will receive the equivalent amount of DAI, calculated automatically by Tylt  based on real-time spot rates at the time of the transaction request.

***

**Example 2:**

The **baseCurrency** doesn't have to be a fiat currency (USD, GBP, EUR, etc.). It can also be a cryptocurrency.

For instance, a merchant providing consulting services charges $100 in USDT.

* If the customer chooses to pay in **USDT**, both the **baseCurrency** and **settledCurrency** will be **USDT**.
* If the customer opts to pay in **DAI**, the **baseCurrency** will be **USDT**, and the **settledCurrency** will be **DAI**.

This scenario shows that both the baseCurrency and settledCurrency can be cryptocurrencies, and Tylt will handle the correct conversion at the moment of the transaction using real-time rates.

{% hint style="info" %}
**Important Notes:**

The **baseCurrency** can be either a supported fiat or cryptocurrency. The **settledCurrency** will always be a cryptocurrency.
{% endhint %}

***

**Good Practices for Using the API**

1. **Use a Unique `merchantOrderId`**

For every transaction, it is highly recommended that you generate and use a unique `merchantOrderId`. This ensures proper tracking and management of each individual payment, reducing the risk of conflicts or duplicate payments.

2. **Utilize Client Name and Notes Fields**

Make good use of the `customerName` and `comments` fields in your API requests. These fields allow you to keep track of payment context, making it easier to identify or reference specific transactions later. Including the client's name or transaction-specific details in these fields can help improve transparency and streamline support in case any issues arise.


---

# 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.tylt.money/tylt-cpg-crypto-asset-gateway/important-concepts.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.
