# Rest API Reference

{% hint style="info" %}
<https://api-partner.paychant.com>
{% endhint %}

### Get Price

## Get asset price

<mark style="color:blue;">`GET`</mark> `/price/{chain}/{asset}?iso={iso_alpha_3}&action={action}`

#### Path Parameters

<table><thead><tr><th width="261">Name</th><th width="156">Type</th><th>Description</th></tr></thead><tbody><tr><td>chain<mark style="color:red;">*</mark></td><td>String</td><td><a href="../resources/supported-stablecoins">Check Supported Stablecoin</a></td></tr><tr><td>asset</td><td>String</td><td><a href="../resources/supported-stablecoins">Check Supported Stablecoin</a></td></tr></tbody></table>

#### Query Parameters

<table><thead><tr><th width="258">Name</th><th width="159">Type</th><th>Description</th></tr></thead><tbody><tr><td>iso<mark style="color:red;">*</mark></td><td>String</td><td><a href="../resources/supported-fiat-currency">Check Supported Fiat Currency</a></td></tr><tr><td>action<mark style="color:red;">*</mark></td><td>String</td><td><a href="../integrations/parameters">Check Parameters for more info</a></td></tr><tr><td>fiatValue</td><td>Integer</td><td>This is an optional integer parameter. If this is selected, the value is used to calculate the returned asset price.</td></tr><tr><td>assetValue</td><td>Integer</td><td>This is an optional integer parameter. If this is selected, the value is used to calculate the returned fiat price.</td></tr><tr><td>networkFee</td><td>String</td><td>This is an optional string parameter of either [ON - OFF]. If ON is selected, paychant network fee will be calculated along side to get the fiat/asset price.</td></tr><tr><td>paymentMethod</td><td>String</td><td>This is an optional string parameter. If this is selected, the transaction fee for the payment method will be calculated along side to get the fiat/asset price. List of supported payment methods <code>id</code> can be found <a href="#available-payment-methods">here</a></td></tr></tbody></table>

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "usd": 1,
    "nga": 1186.04,
    "price": 1216.45,
    "minimum": 1000,
    "maximum": 5000
}
```

{% endtab %}

{% tab title="200: OK" %}

```json
{
    "usd": 0.099,
    "usdc": 0.00084,
    "price": 1213.11,
    "minimum": 1000,
    "maximum": 5000
}
```

{% endtab %}
{% endtabs %}

### Available fiats

## Get supported fiat currency

<mark style="color:blue;">`GET`</mark> `/fiat`

{% tabs %}
{% tab title="200: OK " %}

```json
[
    {
        "fiat": "NGN",
        "iso_alpha_3": "NGA"
    },
    {
        "fiat": "GHS",
        "iso_alpha_3": "GHA"
    },
    ...
]
```

{% endtab %}
{% endtabs %}

## Available assets <a href="#available-assets-and-prices" id="available-assets-and-prices"></a>

## Get supported assets based on action and env

<mark style="color:blue;">`GET`</mark> `/assets/{action}/{env}`

#### Path Parameters

| Name                                     | Type   | Description                                                                              |
| ---------------------------------------- | ------ | ---------------------------------------------------------------------------------------- |
| action<mark style="color:red;">\*</mark> | String | [Check Parameters for more info](https://developer.paychant.com/integrations/parameters) |
| env                                      | String | [Check Parameters for more info](https://developer.paychant.com/integrations/parameters) |

{% tabs %}
{% tab title="200: OK " %}

```json
[
    {
        "chain": "CELO",
        "asset": "CELO"
    },
    {
        "chain": "STELLAR",
        "asset": "USDC"
    },
    {
        "chain": "BSC",
        "asset": "USDT"
    },
    {
        "chain": "POLYGON",
        "asset": "USDC"
    },
    ...
]
```

{% endtab %}
{% endtabs %}

### Available Payment Methods

## Get supported payment method based on fiat currency type

<mark style="color:blue;">`GET`</mark> `/payment-method/{iso_alpha_3}`

#### Path Parameters

| Name          | Type   | Description                                                                                       |
| ------------- | ------ | ------------------------------------------------------------------------------------------------- |
| iso\_alpha\_3 | String | [Check Supported Fiat Currency](https://developer.paychant.com/resources/supported-fiat-currency) |

{% tabs %}
{% tab title="200: OK " %}

```json
[
    {
        "name": "M-Pesa",
        "nameId": "m_pesa"
    },
    {
        "name": "Bank Transfer",
        "nameId": "bank_transfer"
    },
    ...
]
```

{% endtab %}
{% endtabs %}
