# Buy (Fiat On-Ramp)

The minimum Stable Coin buy is $10 (USDT, USDC, E-USDT).

### Exchange Rate

This endpoint is used to get both buy and sell rates between the fiat and crypto pair e.g. NGN-> USDT or USDT->NGN.&#x20;

## This endpoint is used to get the exchange rate

<mark style="color:green;">`POST`</mark> `https://exchanger-api.fuspay.finance/api/v1/no-auth/Axis/ExchangeRate/`

#### Headers

| Name                                            | Type   | Description                           |
| ----------------------------------------------- | ------ | ------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | ***Bearer  ${partner\_secret\_key}*** |
| Content-Type<mark style="color:red;">\*</mark>  | String | application/json                      |
| x-partner-id<mark style="color:red;">\*</mark>  | String | Your partner ID eg. p602xxx           |

#### Request Body

| Name                                   | Type   | Description                                    |
| -------------------------------------- | ------ | ---------------------------------------------- |
| fiat<mark style="color:red;">\*</mark> | String | this is the fiat of the currency pair eg "NGN" |

Request Body

```json
// Sample body request

{
    "fiat":"NGN",
    "chain": "usdt-trc"
}


```

Response

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

```json
{
     success: true,
     message: string,
     data: {
        "NGN/USDT": 1700,
        "USDT/NGN": 1670
     }
}
```

{% endtab %}
{% endtabs %}

"FIAT(NGN)/STABLE\_COIN(USDT)": "This notation means you are buying the stable coin at the rate shown"

"STABLE\_COIN(USDT)/FIAT(NGN)": "This notation means you are selling the fiat at the rate shown"

### Create Buy Order Endpoint&#x20;

## This is used to initiate a new buy order. The life cycle of the order is encapsulated in three (3) events as seen below

<mark style="color:green;">`POST`</mark> `https://exchanger-api.fuspay.finance/api/v1/no-auth/Axis/BuyUsdtWithFiat/`

All events will be communicated to the callback registered in the post request.

Event request body will be updated as buy order progresses through the following phases:&#x20;

a. event.buy.init  (buy order started, awaiting fiat payment)

b. event.buy.received.fiat (fiat payment received)

c. event.buy.credited.crypto (transaction completed)

d. event.buy.error (error occurred)

<mark style="color:red;">Event body is signed with sha 512. sha512(body, public\_key+secret\_key)</mark>

### The diagram below shows the complete flow of a buy order&#x20;

<figure><img src="https://1683729599-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFU24OF8juMGRM9K7EdyI%2Fuploads%2F0GmrdqbUIVVvboVscc4N%2FBuy%20Axis.jpg?alt=media&#x26;token=5ac0696b-b7dd-4f62-8fbb-c62fce999f76" alt=""><figcaption></figcaption></figure>

{% file src="<https://1683729599-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFU24OF8juMGRM9K7EdyI%2Fuploads%2FvmfU63Aqsrh0xQDRJ4VB%2FAxis%20Swap%20API%20Flow-BUY.pdf?alt=media&token=017edc32-7663-4fc1-9786-b63c0ac343c8>" %}

The event body is right below. to show the data structure that should be expected.&#x20;

{% hint style="danger" %}
Axis does not handle third party on-ramp orders.  i.e . The name of the user the payer bank account has to pass 66% name match with the user's KYC name on Axis.\
\
All transactions that faill this test will be pending.  See the ["Pending Transactions"](https://app.gitbook.com/o/UlsbQabTdQpnUffvzs7w/s/FU24OF8juMGRM9K7EdyI/~/changes/37/order-history-and-status/pending-transactions) side bar for more information
{% endhint %}

####
