# API Endpoints

{% hint style="info" %}
Be sure to pass your api key in the headers with the name <mark style="color:orange;">`x-api-key`</mark> to authorize your request
{% endhint %}

```json
// Some code
x-api-key: YOUR_API_KEY
Content-Type: application/json
```

## Fetch Rate - GET /api/payments/

#### Body

```json
{
  "token": "USDC", //USDT or USDT
  "amount": 1,
  "currency": "NGN"
}

```

Response

```json
{
    "status": "success",
    "message": "Rate fetched successfully",
    "data": "1600.91"
}
```

### Fetch Supported Currencies - GET /api/payments/currencies

#### Body

```
[
    {
        "code": "XOF-BEN",
        "name": "West African CFA franc",
        "shortName": "Céfa Benin",
        "decimals": 2,
        "symbol": "CFA",
        "marketRate": "599.5"
    },
    {
        "code": "XOF-CIV",
        "name": "West African CFA franc",
        "shortName": "Céfa CIV",
        "decimals": 2,
        "symbol": "CFA",
        "marketRate": "599.5"
    },
    {
        "code": "KES",
        "name": "Kenyan Shilling",
        "shortName": "KES",
        "decimals": 2,
        "symbol": "KSh",
        "marketRate": "128.59"
    },
    {
        "code": "GHS",
        "name": "Ghana Cedi",
        "shortName": "Cedi",
        "decimals": 2,
        "symbol": "GH¢",
        "marketRate": "14.46"
    },
    {
        "code": "NGN",
        "name": "Nigerian Naira",
        "shortName": "Naira",
        "decimals": 2,
        "symbol": "₦",
        "marketRate": "1613.91"
    },
    {
        "code": "UGX",
        "name": "Ugandan Shilling",
        "shortName": "UGX",
        "decimals": 2,
        "symbol": "USh",
        "marketRate": "3640.705"
    },
    {
        "code": "TZS",
        "name": "Tanzanian Shilling",
        "shortName": "TZS",
        "decimals": 2,
        "symbol": "TSh",
        "marketRate": "2705.055"
    }
]
```
