Create Sell Order Endpoint

This is used to initiate and finalize a new sell order.

POST https://exchanger-api.fuspay.finance/api/v1/no-auth/Axis/InitiateSellOrder/

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

Event request body will be updated as the sell order progresses through the following phases:

a. event.sell.init // buy order started, awaiting crypto payment

b. event.sell.received.crypto // crypto payment received by axis

c.event.sell.credited.fiat // transaction completed.user account credited

d. event.sell.error // error occured

Event body is signed with sha 512. sha512(body, public_key+secret_key)

The diagram below shows the complete flow of a sell order

Sample of the Event body would be posted below after the endpoints description

Headers

Name
Type
Description

Authorization*

String

"Bearer ${partner_secret_key}"

x-partner-id*

String

"pxxxxxx"

Request Body

Name
Type
Description

partner_order_id*

String

Id of order generated on partners's system

chain*

String

e.g usdt-trc20, usdc-matic

crypto_amount*

String

the amount of USDT to be exchanged

fiat_currency_to_receive*

String

equivalent fiat user would receive based on exchange rate

partner_callback_url*

String

The partner Id returned from the onboarding endpoint

seller_phone*

String

phone number of the seller

seller_email*

String

Email of the seller

first_name*

String

First name of the seller

last_name*

String

last name of the seller

account_name*

String

The name of the account holder.

account_number*

String

This is the bank account number or phone number if MOMO

account_code*

String

This is the bank code or MOMO provider (Mpesa, MTN) . A code that represents the bank where the fiat would be transferred to

intrapay_merchant_id*

String

Intrapay Merchant ID is a unique identification number gotten by signing up and setting up your wallet on Intrapay.

markup_fee*

String

This is the percentage charge that would be applied in the transaction with the merchant. It is paid into your intrapay wallet.

refund_wallet_address*

String

this is the eusd wallet address of the seller

SELL EVENTS

Event Body Description

Keys
Description
Values

event_name

This is the name of the buy event

event buy init, event buy received fiat, event buy credited crypto.

partner_order_id

Id of order generated on partner's system

fuspay_order_ref

Reference number of order generated on Fuspay system

fiat_amount_to_pay

The equivalent fiat amount user would pay based on exchange rate

crypto_amount_to_receive

This is the amount of cryptocurrency to be received

exchange_rate

This is the exchange rate

pair

fiat_currency

This is the amount of fiat currency to be bought

buyer_crypto_address

The buyer's crypto address

chain

e.g. usdt-trc20, usdc-matic

fiat_payment_status

This is the fiat payment status.

Pending (payment has not been fully processed yet) or Paid (payment is fully processed and successful)

crypto_payment_status

This is the crypto payment status.

Started (payment is in process), Completed (payment is fully processed and completed)

account_name

This is the name of the account holder

account_number

This is the bank account number or phone number if MOMO

bank_name

The name of the bank

email

Email of the buyer

phone

Phone number of the buyer

first_name

First name of the buyer

last_name

Last name of the buyer

payment_link

This is the payment link given to the buyer

Null (no value), //available for MOMO payments

crypto_txn_hash

This is the crypto transaction has given to the buyer

Null (no value)

partner_callback_url

The partner Id returned from the onboarding endpoint

signature

This is the buyer's signature

Null (no value), // sha512 signed with public key + secret key }

Sample event for Sell Order

Event Body Description

Keys
Description
Values

event_name

This is the name of the event

event sell init, event sell received fiat, event sell credited crypto.

partner_order_id

Id of order generated on partner's system

fuspay_order_ref

Reference number of order generated on Fuspay system

fiat_amount_to_receive

The equivalent fiat amount user would receive based on exchange rate

crypto_amount_to_sell

This is the amount of cryptocurrency to be received

exchange_rate

This is the exchange rate

pair

fiat_currency

This is the amount of fiat currency to be sold

pay_to_crypto_address

This is the crypto address to pay too

chain

e.g. usdt-trc20, usdc-matic

fiat_payment_status

This is the fiat payment status.

Pending (payment has not been fully processed yet), Cancelled (payment transaction has been stopped) or Paid (payment is fully processed and successful)

crypto_payment_status

This is the crypto payment status.

Pending (payment has not been fully processed yet), Cancelled (payment transaction has been stopped) or Paid (payment is fully processed and successful)

account_name

This is the name of the account holder

account_number

This is the bank account number or phone number if MOMO

account_code

This is the bank code or MOMO provider (Mpesa, MTN) . A code that represents the bank where the fiat would be transferred to.

bank_name

The name of the bank

email

Email of the seller

phone

Phone number of the seller

first_name

First name of the seller

last_name

Last name of the seller

seller_crypto_txn_hash

This is the transaction hash given to the seller

Null (no value)

partner_callback_url

The partner Id returned from the onboarding endpoint

signature

This is the seller's signature

string // sha512 signed with public key + secret key

Last updated

Was this helpful?