# Requested amount & currency

When using [`getDepositAddress`](https://docs.akashicpay.com/sdk/functions/getdepositaddress) or [`getDepositUrl`](https://docs.akashicpay.com/sdk/functions/getdepositurl) with a `referenceId` , you may additionally specify the amount you expect to receive in a range of currencies. If amount-matching is enabled in the Developer-settings on AkashicPay, the `referenceId` will only be attached to the callback for a deposit matching the requested amount.

## <mark style="color:blue;">Important Points</mark>

* Relax Matching can be configured on the [Developers](https://docs.akashicpay.com/dashboard/developers#relax-matching) setting and It is enabled by default.
* Amounts are matched within ±1% threshold between the requested amount and the actual deposit amount.
* If specifying a currency different from the one of the deposit, the exchange rate at the time of requesting the address/url is used (particularly relevant for amounts in fiat)
* Callbacks are still sent for all deposit (if the callback URL is correctly configured), regardless of matching or not. The difference is the inclusion of the `referenceId` and `depositRequest` fields
  * `depositRequest` will have the `exchangeRate` and `requestedValue` (see [Deposit Callback](https://docs.akashicpay.com/callbacks/deposit-callbacks) for details)&#x20;

> Note: We provide a Relax Matching feature to handle differences between the requested and actual deposit amounts — learn more [here](https://docs.akashicpay.com/dashboard/developers#relax-matching).

## <mark style="color:blue;">Markup/Markdown</mark>

AkashicPay provides a mechanism for you to easily add a markup (or markdown) to a deposit. By providing an additional parameter in [`getDepositAddress`](https://docs.akashicpay.com/sdk/functions/getdepositaddress) or [`getDepositUrl`](https://docs.akashicpay.com/sdk/functions/getdepositurl) the exchange rate between the requested and received currency will be adjusted as follows:

$$
R\_f = R\_i \times  \dfrac{100 + X}{100}
\\
\--------------------------\\
R\_i = \text{Initial Rate}, R\_f = \text{Final Rate}, X =\text{Markup/markdown percentage}
$$

A positive X is a markup/premium, while a negative X is a markdown/discount. X is limited to the range `(-100,100)`

&#x20;\
Example: You are requesting a deposit valued to 100 HKD, payment will be made in USDT. The HKD-USDT exchange rate is 0.12 (1 HKD is worth 0.12 USDT). Normally, the transaction would have to be for 12 USDT. However, by applying a markup of 10%, the exchange-rate is adjusted from 0.12 -> 0.132 meaning the order will now only be completed upon receiving 13.2 USDT.    &#x20;

## <mark style="color:blue;">Supported Currencies</mark>

You may request an amount in the following fiat currencies:

* CNY (Renminbi/Chinese Yuan)
* HKD (Hong Kong Dollar)
* TWD (New Taiwan Dollar)
* USD (United States Dollar)
* CHF (Swiss Franc)
* EUR (Euro)
* IDR (Indonesian Rpiah)
* INR (Indian Rupee)
* JPY (Japanese Yen)
* KHR (Cambodian Riel)
* KRW (South Korean Won)
* MYR (Malaysian Ringgit)
* PHP (Philippine Peso)
* SGD (Singapore Dollar)
* THB (Thai Baht)
* VND (Vietnamese Đồng)

And the following cryptocurrencies:

* TRX (Tron)
* ETH (Ethereum)
* BNB (BNB Smart Chain (BSC))
* SOL (Solana)
* USDT (TRX)
* USDT (ETH)
* USDC (ETH)
* USDT (BNB)
* USDC (BNB)
* USDT (SOL)
* USDC (SOL)

The deposit may be settled in any of the [supported cryptocurrencies](https://docs.akashicpay.com/guides/supported-currencies):&#x20;

* TRX (Tron)
* ETH (Ethereum)
* BNB (BNB Smart Chain (BSC))
* SOL (Solana)
* USDT (TRX)
* USDT (ETH)
* USDC (ETH)
* USDT (BNB)
* USDC (BNB)
* USDT (SOL)
* USDC (SOL)

## <mark style="color:blue;">Example</mark>

*Note: The code on this page should be regarded as pseudocode. Refer to the pages in the documentation describing the specific functions for details in every supported language.*

Let's say you want user `user1` to make a deposit with value equivalent to 10 CNY and that you want the user to use the Tron [Network](https://docs.akashicpay.com/introduction/terminology#network).  First, you would ask for a deposit address like so:

```typescript
AkashicPay.getDepositAddressWithRequestedValue('TRX', 'user1', 'order-123', 'CNY', '10.00')
```

In return, you would get an address to supply to the user. You can inform them to deposit an amount of cryptocurrency equivalent to 10 CNY into that address.

At the time of this request, imagine 1 TRX is worth 2 CNY exactly. If the user then makes a deposit of 5 TRX, the order will be satisfied and the callback will include the following extra fields (see [Deposit Callback](https://docs.akashicpay.com/callbacks/deposit-callbacks) for complete callback details):

```json
{
...,
"referenceId": "order-123",
"depositRequest": {
    "exchangeRate": "2.00"
    "requestedValue": {
        "amount": "10.00",
        "currency": "CNY"
        },
    },
...
}
```

However, if the user instead deposited e.g. 10 TRX the order would *not* be satisfied and the above fields would *not* be included in the callback (though a callback is still sent!). Only upon an exact match will the order be satisfied and the callback populated.

> **NOTE: Deposit-Requests expire after 1 Day (24hrs) by default!**&#x20;
>
> * After 24 hours, a user may still deposit and you will still receive the funds, but the `referenceId` will have expired and no amount-matching will take place.
> * You can adjust this expiry time in the [Callback Settings](https://docs.akashicpay.com/dashboard/developers#deposit-request-expiry-time), ranging from 00:15 to 24:00 hours.
