{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-products/hosted-checkout/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Create Sell Order","description":"Official Banxa API documentation – on-ramp and off-ramp transfers with identity verification and compliance.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"create-sell-order","__idx":0},"children":["Create Sell Order"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create an off-ramp order (crypto → fiat) for a customer. Returns a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkoutUrl"]}," to redirect or embed so the customer can complete their transaction."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"endpoint","__idx":1},"children":["Endpoint"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"POST /{partnerRef}/v2/sell\n"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"request-body","__idx":2},"children":["Request body"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["crypto"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cryptocurrency code the customer wants to sell (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ETH"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BTC"]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["blockchain"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Blockchain network for the crypto asset (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ETH"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BNB"]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fiat"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fiat currency the customer wants to receive (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AUD"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EUR"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BRL"]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["walletAddress"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customer's sending wallet address."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cryptoAmount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Amount of cryptocurrency the customer wants to sell."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["redirectUrl"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["URL to redirect the customer to after checkout completes or is cancelled."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paymentMethodId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Pre-selects the payout method. If omitted, the customer chooses in checkout."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["externalCustomerId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your stable identifier for this customer. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/hosted-checkout/docs/getting-started/integration-best-practices#externalcustomerid"},"children":["best practices"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["externalOrderId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your own order reference to attach to this transaction. Banxa stores it and returns it in order responses and webhooks for reconciliation."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["walletAddressTag"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Secondary wallet identifier required by some blockchains (e.g., memo for XLM, destination tag for XRP). Required when the source wallet requires a tag."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["discountCode"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Discount code to apply to the order."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subPartnerId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Identifier for a sub-partner or segment within your account (e.g., different sites or resellers)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["metadata"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Additional free-form data to attach to the order. Returned as-is in order responses and webhooks."]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"payment-method-ids-sell","__idx":3},"children":["Payment method IDs (sell)"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Payout method"},"children":["Payout method"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payid-bank-transfer"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["PayID bank transfer (AUD)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sepa-bank-transfer"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["SEPA bank transfer (EUR)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pix"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["PIX (BRL)"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"example-requests","__idx":4},"children":["Example requests"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"payid-aud","__idx":5},"children":["PayID (AUD)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://api.banxa-sandbox.com/{partnerRef}/v2/sell\" \\\n  -H \"x-api-key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"crypto\": \"ETH\",\n    \"blockchain\": \"ETH\",\n    \"fiat\": \"AUD\",\n    \"cryptoAmount\": \"0.5\",\n    \"walletAddress\": \"0xcbf80ee36fbf03307962576f338fc50b942e0591\",\n    \"redirectUrl\": \"https://yourapp.com/order-complete\",\n    \"paymentMethodId\": \"payid-bank-transfer\"\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sepa-eur","__idx":6},"children":["SEPA (EUR)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://api.banxa-sandbox.com/{partnerRef}/v2/sell\" \\\n  -H \"x-api-key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"crypto\": \"ETH\",\n    \"blockchain\": \"ETH\",\n    \"fiat\": \"EUR\",\n    \"cryptoAmount\": \"0.5\",\n    \"walletAddress\": \"0xcbf80ee36fbf13307962576f338fc50b942e0591\",\n    \"redirectUrl\": \"https://yourapp.com/order-complete\",\n    \"paymentMethodId\": \"sepa-bank-transfer\"\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"pix-brl","__idx":7},"children":["PIX (BRL)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://api.banxa-sandbox.com/{partnerRef}/v2/sell\" \\\n  -H \"x-api-key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"crypto\": \"ETH\",\n    \"blockchain\": \"ETH\",\n    \"fiat\": \"BRL\",\n    \"cryptoAmount\": \"0.0015\",\n    \"walletAddress\": \"0xcbf80ee37fbf03307962576f327fc50b942e0591\",\n    \"redirectUrl\": \"https://yourapp.com/order-complete\",\n    \"paymentMethodId\": \"pix\"\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"response","__idx":8},"children":["Response"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["201 Created"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"checkoutUrl\": \"https://partner.banxa.com/portal?expires=xxx&oid=xxx&signature=xxx\",\n  \"id\": \"191fa5b4b1f45e1cf784422e09317d56\",\n  \"externalOrderId\": \"a4b427ccb872a1744b317456bd0d165f\",\n  \"externalCustomerId\": \"user_12345\",\n  \"fiat\": \"AUD\",\n  \"fiatAmount\": \"1000.00\",\n  \"crypto\": \"ETH\",\n  \"cryptoAmount\": null,\n  \"blockchain\": \"ETH\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkoutUrl"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["URL to redirect or embed for the customer to complete their transaction."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Banxa order ID. Store this for order lookup and reconciliation."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["externalOrderId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your order reference (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["externalOrderId"]}," from the request). Null if not provided."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["externalCustomerId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The customer identifier you provided."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fiat"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fiat currency code (string)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fiatAmount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fiat amount as a string."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["crypto"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cryptocurrency code (string)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cryptoAmount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Crypto amount as a string. Null if not provided in the request."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["blockchain"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Blockchain network."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/hosted-checkout/docs/transaction-lifecycle/order-lookup"},"children":["order lookup"]}," or ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/hosted-checkout/docs/transaction-lifecycle/webhooks"},"children":["webhooks"]}," to track the order after checkout."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"custodial-vs-non-custodial-flows","__idx":9},"children":["Custodial vs. non-custodial flows"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The sell flow has two variants depending on how the crypto transfer is handled:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Non-custodial"]}," — the customer initiates the crypto transfer themselves. Banxa displays a wallet address and QR code in checkout, and the customer sends the crypto manually."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Custodial"]}," — your platform handles the crypto transfer on behalf of the customer. After the customer completes checkout, Banxa notifies you via webhook and you execute the transfer, then confirm it via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v2/orders/{id}/confirm"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["→ See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/hosted-checkout/docs/on-ramp-off-ramp/custodial-vs-non-custodial"},"children":["Custodial vs. Non-Custodial"]},"."]}]},"headings":[{"value":"Create Sell Order","id":"create-sell-order","depth":1},{"value":"Endpoint","id":"endpoint","depth":2},{"value":"Request body","id":"request-body","depth":2},{"value":"Payment method IDs (sell)","id":"payment-method-ids-sell","depth":2},{"value":"Example requests","id":"example-requests","depth":2},{"value":"PayID (AUD)","id":"payid-aud","depth":3},{"value":"SEPA (EUR)","id":"sepa-eur","depth":3},{"value":"PIX (BRL)","id":"pix-brl","depth":3},{"value":"Response","id":"response","depth":2},{"value":"Custodial vs. non-custodial flows","id":"custodial-vs-non-custodial-flows","depth":2}],"frontmatter":{"title":"Create a Sell Order — POST /v2/sell | Banxa Docs","description":"Create a crypto-to-fiat off-ramp order with POST /v2/sell. Supports PayID, SEPA, and PIX payouts. Includes custodial and non-custodial flow guidance.","seo":{"title":"Create Sell Order"}},"lastModified":"2026-05-19T23:30:38.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/hosted-checkout/docs/api-integration/create-sell-order","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}