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 IDsource
: a supported fiat currency e.g. USDtarget
: a supported cryptocurrency e.g. BTCwallet_address
: the address associated with the cryptocurrency being purchasedreturn_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 IDsource
: similar to a Buy order, this parameter is now a supported cryptocurrency instead of fiat currencytarget
: supported fiat currencyrefund_address
: the address associated with the cryptocurrency being sold in the even that a refund of is necessaryreturn_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 |
---|---|---|
| Unique ID for the the order | number |
| Banxa generated account ID for the customer and linked to the customer reference provided by you | string |
| Unique customer reference provided by you | string |
| Order type. Indicates whether the order is a sell or buy crypto order | string |
| Fiat currency code | string |
| Fiat currency value | decimal |
| Cryptocurrency code | string |
| Cryptocurrency value | decimal |
| Cryptocurrency wallet address | string |
| Blockchain network used for the cryptocurrency | array |
| Blockchain code | string |
| Blockchain name | string |
| Timestamp of order creation in UTC | string |
| URL that redirects customer to Banxa checkout | string |