Skip to content
Last updated

API Integration Overview

For the complete documentation index, see llms.txt. Append .md to any page URL for its markdown version.

The API integration gives you full programmatic control over the Banxa checkout experience. You make server-to-server REST API calls to fetch quotes, create orders, and manage your integration. The checkout URL is returned in the order response, and you redirect or embed it from there.


When to use API integration

Choose API integration if you need any of the following:

  • Webhooks — real-time order status notifications pushed to your endpoint.
  • Quote UI — show customers a price comparison within your own interface before they enter checkout.
  • KYC sharing — pass verified customer identity data to Banxa to reduce checkout friction.
  • Order history — look up past orders programmatically.
  • Programmatic control — control which payment methods, currencies, and crypto assets are presented to each customer.

API groups

The Banxa v2 API is organised into the following groups:

Order API

Create buy and sell orders from your backend. Returns a checkout URL to redirect or embed for the customer.

POST /{partnerRef}/v2/buy · POST /{partnerRef}/v2/sell

Quote API

Retrieve current pricing for any combination of crypto, fiat, and payment method. Call this before every order to ensure customers see accurate pricing.

GET /{partnerRef}/v2/quotes/{orderType}

Payment Methods API

Retrieve the payment methods (buy) or payout methods (sell) available to your customers.

GET /{partnerRef}/v2/payment-methods/{orderType}

Countries & Currencies API

Retrieve supported countries, fiat currencies, and cryptocurrencies.

GET /{partnerRef}/v2/countries · GET /{partnerRef}/v2/fiats/{orderType} · GET /{partnerRef}/v2/crypto/{orderType}

{orderType} is buy or sell. If you leave it out, these endpoints and the Quote API return buy data, so always pass sell when you build a sell flow. The countries list is the same for buy and sell.

Identity API

Share verified KYC data with Banxa before order creation to streamline the checkout experience for returning customers.

POST /{partnerRef}/v2/identities/token/share


Typical buy (on-ramp) flow

1. GET  /v2/quotes/buy      → Show customer a price
2. POST /v2/buy             → Create order, receive checkoutUrl
3. Redirect customer        → To checkoutUrl (redirect or iFrame)
4. Webhook notification     → Banxa POSTs order status to your endpoint

→ Detailed steps: Get a Quote · Create Buy Order · IP Binding · Redirecting to Checkout

Typical sell (off-ramp) flow

1. GET  /v2/quotes/sell     → Show customer a price
2. POST /v2/sell            → Create order, receive checkoutUrl
3. Redirect customer        → To checkoutUrl (redirect or iFrame)
4. Crypto is sent to Banxa  → By the customer, your wallet app, or your platform,
                              depending on your account's fulfilment flow
5. Webhook notification     → Banxa POSTs order status to your endpoint

In the custodial flow, step 4 is your platform: get the deposit address from GET /v2/orders/{orderId}, send the crypto, then call POST /v2/orders/{orderId}/confirm. → See Custodial vs. Non-Custodial.

→ Detailed steps: Get a Quote · Create Sell Order · IP Binding · Redirecting to Checkout


Buy vs. sell

Both directions use the same authentication, checkout URL handling and webhooks. These are the differences:

Buy (on-ramp)Sell (off-ramp)
Create orderPOST /v2/buyPOST /v2/sell
Quote and discovery endpoints/quotes/buy, /payment-methods/buy, /fiats/buy, /crypto/buy/quotes/sell, /payment-methods/sell, /fiats/sell, /crypto/sell
paymentMethodIdHow the customer pays, e.g. debit-credit-cardHow the customer is paid out, e.g. sepa-bank-transfer. See sell payout method IDs
fiatAmount / cryptoAmountFiat to spend / crypto to receiveFiat to receive / crypto to sell
walletAddressWallet that receives the cryptoWallet the crypto is sent from; also the refund address
How the crypto movesBanxa sends it to walletAddressSent to a Banxa deposit address, by the flow configured for your account: QR code, MetaMask, Native Wallet, WebView bridge or custodial
Typical statusespendingPayment → paymentReceived → … → cryptoTransferred → completewaitingPayment → paymentReceived → complete
transactionHashBanxa's transfer to the customerThe customer's deposit to Banxa
Sell-only endpoint—POST /v2/orders/{orderId}/confirm (custodial flow)
Account setup—Off-ramp must be enabled and a fulfilment flow configured by Banxa. See Off-ramp configuration

→ Statuses: Order Statuses · Referral sell links: Supported Parameters


Authentication

All v2 API requests require your API key in the request header:

x-api-key: YOUR_API_KEY

The identity endpoint uses HMAC authentication. → See Authentication & Environments.


Base URLs

EnvironmentBase URL
Sandboxhttps://api.banxa-sandbox.com/{partnerRef}
Productionhttps://api.banxa.com/{partnerRef}