# Events

The Axis API is event driven, and below is the definition and the event structure for buy or sell transactions&#x20;

### How the sell side works&#x20;

1. Get the exchange rate using the exchange rate endpoint&#x20;
2. Initiate & finalize a sell order using the create sell order endpoint.&#x20;
3. The <mark style="color:orange;">**event.sell.init**</mark> is sent to your callback URL . This shows you the crypto address to send the crypto asset being sold to.
4. The event,  "<mark style="color:orange;">**event.sell.received.crypto**</mark>" is sent back to your callback after the stable coin has been sent to the crypto address.
5. As we have received the recipients fiat account details a payout would be made to the account and another event, "<mark style="color:orange;">**event.sell.credited.fiat**</mark>" would be posted to your callback showing that the payout has being made to your user

### Sample Event for a Sell Order&#x20;

```json
Event body {
       event_name: "event.sell.init or ...",
       partner_order_id: "",
       fuspay_order_ref: "",
       fiat_amount_to_receive: "",
       crypto_amount_to_sell: "",
       exchange_rate: "",
       pair: "",
       fiat_currency: "",
       pay_to_crypto_address: "",
       chain: "usdt-trc20",
       fiat_payment_status: "", // PENDING, CANCELED, PAID
       crypto_payment_status: "", // PENDING, CANCELED, PAID

     seller_fiat_account: {
     account_name: "",
     account_number: "",
     account_code: ""
     },
     seller_crypto_txn_hash: null,
     partner_callback_url: ""
     signature: string // sha512 signed with public key + secret key
     }

```

<table><thead><tr><th width="196">key</th><th>Description</th></tr></thead><tbody><tr><td>event_name</td><td>This is the name of the event. Possible sell events are  </td></tr><tr><td>partner_order_id</td><td>The order ID generated from your system</td></tr><tr><td>fuspay_order_ref</td><td> A reference identifying the transaction on the fuspay system </td></tr><tr><td>fiat_amount_to_receive</td><td>This is the fiat amount to be received by your user </td></tr><tr><td>crypto_amount_to_sell</td><td>This is the crypto amount your user is trying to sell </td></tr><tr><td>exchange_rate</td><td>This is the exchange rate gotten from the exchange rate endpoint </td></tr><tr><td>pair</td><td></td></tr><tr><td>fiat_currency</td><td>This is the currency code for the fiat currency eg NGN</td></tr><tr><td>pay_to_crypto_address</td><td>This is the crypto address your users crypto should be sent to. eg. USDT to make payment to </td></tr><tr><td>chain</td><td>This is the blockchain or network where the crypto address lives e.g usdt-trc20</td></tr><tr><td>fiat_payment_status</td><td>This is the status of the fiat payment made to your user after USDT receipt as been confirmed </td></tr><tr><td>crypto_payment_status</td><td>This is the payment status or your crypto transfer to crypto address sent to you as an event to your callback URL </td></tr><tr><td>seller_fiat_account</td><td>This is an Object representing where the recipient of the FIAT</td></tr><tr><td>      account_name</td><td>This is the name of the fiat recipient </td></tr><tr><td>      account_number</td><td>This is the phone number or bank account number of the recipient </td></tr><tr><td>      account_code</td><td>This is the bank code (058)  or MOMO provider (MPESA, VOD, MTN)</td></tr><tr><td>seller_crypto_txn_hash</td><td>This is the hash of the crypo transfer made by the seller (your user)</td></tr><tr><td>partner_callback_url</td><td>This is a URL where events would be posted</td></tr><tr><td>signature</td><td>This is the signature of the event body. This is a SHA 512 signature signed with both your public and secret key. </td></tr><tr><td></td><td></td></tr></tbody></table>

1.


---

# 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://axis-docs.fuspay.finance/events.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.
