Skip to main content

API Reference

The Flux API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

You can use the Flux API in sandbox mode, which does not affect your live data or interact with the wallets networks.

Authentication

The Flux API uses an access token to authenticate requests. You will provided with a refresh token from Flux team and this refresh token will use to obtain your access token using propper endpoint.

Your API refresh token carry many privileges, so be sure to keep them secure! Do not share your secret refresh token in publicly accessible areas such as GitHub, client-side code, and so forth.

All API requests must be made over HTTPS. API requests withour authentication will also fail.

Errors

Flux uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information propided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the 5xx range indicate an error with Flux's servers (these are rare).

Some 4xx errors that could be handled programmatically (e.g., a qr is declined) include an error code that briefly explains the error reported.