Allows your customer to create a buy or sell crypto order with Banxa. Upon success, the response will contain a checkout URL which will be unique for the order. The customer will be redirected to this URL to complete the checkout process, which will expire after 1 minute if a redirect does not occur.

Building a Request for Buy Orders (On-Ramp)

Buy orders require the following mandatory fields:

  • account_reference: the customer's unique ID
  • source: a supported fiat currency e.g. USD
  • target: a supported cryptocurrency e.g. BTC
  • wallet_address: the address associated with the cryptocurrency being purchased
  • return_url_on_success: used to return the customer to your website once the order is completed

Building a Request for Sell Orders (Off-Ramp)

Sell orders require the following mandatory fields:

  • account_reference: the customer's unique ID
  • source: similar to a Buy order, this parameter is now a supported cryptocurrency instead of fiat currency
  • target: supported fiat currency
  • refund_address: the address associated with the cryptocurrency being sold in the event that a refund is necessary
  • return_url_on_success: used to return the customer to your website once the order is completed

Response

When an order is ready to be completed by the customer, you will receive the following:

Field

Description

Format

data.order.id

Unique ID for the the order

number

data.order.account_id

Banxa generated account ID for the customer and linked to the customer reference provided by you

string

data.order.account_reference

Unique customer reference provided by you

string

data.order.order_type

Order type. Indicates whether the order is a sell or buy crypto order

string

data.order.fiat_code

Fiat currency code

string

data.order.fiat_amount

Fiat currency value

decimal

data.order.coin_code

Cryptocurrency code

string

data.order.coin_amount

Cryptocurrency value

decimal

data.order.wallet_address

Cryptocurrency wallet address

string

data.order.blockchain

Blockchain network used for the cryptocurrency

array

data.order.blockchain.code

Blockchain code

string

data.order.blockchain.description

Blockchain name

string

data.order.created_at

Timestamp of order creation in UTC

string

data.order.checkout_url

URL that redirects customer to Banxa checkout

string

Language
Authentication
Header
Click Try It! to start a request and see the response here!