Events

This page list all the events and their data structurees

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

How the sell side works

  1. Get the exchange rate using the exchange rate endpoint

  2. Initiate & finalize a sell order using the create sell order endpoint.

  3. The event.sell.init is sent to your callback URL . This shows you the crypto address to send the crypto asset being sold to.

  4. The event, "event.sell.received.crypto" 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, "event.sell.credited.fiat" would be posted to your callback showing that the payout has being made to your user

Sample Event for a Sell Order

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
     }
key
Description

event_name

This is the name of the event. Possible sell events are

partner_order_id

The order ID generated from your system

fuspay_order_ref

A reference identifying the transaction on the fuspay system

fiat_amount_to_receive

This is the fiat amount to be received by your user

crypto_amount_to_sell

This is the crypto amount your user is trying to sell

exchange_rate

This is the exchange rate gotten from the exchange rate endpoint

pair

fiat_currency

This is the currency code for the fiat currency eg NGN

pay_to_crypto_address

This is the crypto address your users crypto should be sent to. eg. USDT to make payment to

chain

This is the blockchain or network where the crypto address lives e.g usdt-trc20

fiat_payment_status

This is the status of the fiat payment made to your user after USDT receipt as been confirmed

crypto_payment_status

This is the payment status or your crypto transfer to crypto address sent to you as an event to your callback URL

seller_fiat_account

This is an Object representing where the recipient of the FIAT

account_name

This is the name of the fiat recipient

account_number

This is the phone number or bank account number of the recipient

account_code

This is the bank code (058) or MOMO provider (MPESA, VOD, MTN)

seller_crypto_txn_hash

This is the hash of the crypo transfer made by the seller (your user)

partner_callback_url

This is a URL where events would be posted

signature

This is the signature of the event body. This is a SHA 512 signature signed with both your public and secret key.

Last updated