Developer API

Numifex provides a simple REST API which allows you integrate with a custom eCommerce platform.

Authorization

All requests must include an API token in the Authorization header. This should follow the bearer pattern:

Authorization: Bearer l/zIdEbx7iDf/m4cLejrwY1ZrbqLeFpVL72xesBbFfo=

You can create an API token from the Numifex admin:

_images/creating_api_token.png

Creating Orders

POST /placeorder

Submit a new cryptocurrency order.

{
    "commerce_id": "woocommerce",
    "order_total": "100000000",
    "order_currency": "ETH",
    "currency_conv_rate": 256.5,
    "currency": "USD",
}
Request JSON Object:
 
  • commerce_id (string) – An identifier for the eCommerce platform which submitted the order. If you are writing a custom client, you should define your own. woocommerce and magento are reserved.
  • order_total (string) – The total amount to charge for this order. Typically this is represented in the smallest denomination for the currency (wei for Ethereum, Satoshi for Bitcoin, etc). Stored as a string to hold big numbers.
  • order_currency (string) – A code identifying which crypto currency the order is payed in. For example ETH or BTC.
  • currency_conv_rate (number) – The conversation rate from fiat to crypto. fiat/crypto. For example 8000.0 for 8000 USD/BTC. This is only for record keeping purposes and is optional.
  • currency (string) – A string code identifying the fiat currency that the order originated from. For example EUR or USD. This is only for record keeping purposes and is optional.
Response JSON Object:
 
  • address (string) – The crypto currency address created for this order. The order is payed when this settlement address is funded with the correct balance.

Pricing Orders

POST /calculate-price

Most merchants and eCommerce platforms do business in fiat currency (USD, EUR, etc). This route is provided to convert the price of an order from fiat, to crypto currency.

It also has parameters for risk level which allow the route to pick a slightly higher price which accounts for volatility. For details about these options see Pricing

Request JSON Object:
 
  • order_total (number) – The total amount in fiat to convert to crypto. For example 100.0 for $100 USD.
  • order_currency (string) – A code identifying a crypto currency to convert to. For example ETH or BTC.
  • currency (string) – A code identifying the fiat currenct to convert from. For example USD or EUR.
  • time_to_sell (number) – The number of days the merchant intends to wait before exchanging the crypto for fiat at an exchange.
  • risk_level (string) – The risk levels are low, medium, high, or market. The default is market.

Currency Codes

This page lists currency codes for major currencies.