Allows your customer to create a 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.
This is the blockchain that is associated with the crypto token. If none is provided, then a default will be used.
The amount of fiat the user wants to sell. Either fiatAmount OR cryptoAmount must be provided. If both are provided, then cryptoAmount will be used.
The amount of crypto the user wants to sell. Either fiatAmount OR cryptoAmount must be provided. If both are provided, then cryptoAmount will be used.
The wallet address that the user will use to send the crypto. This will also be the wallet address used for refunds if a refund is necessary.
The URL the user will be redirected to after the buy flow has been completed. If the case of an order failure or cancellation, then the returnUrl will be appended with the status e.g. /?status=failure, /?status=cancel
Your defined ID for associating an order with. e.g. you may use this to differentiate between channels such as Exchange, Wallet, Web, Mobile.
Free form string that you can use to send us any information that will be returned in the Get Orders endpoint
Unique customer reference provided by you. Used to check whether customer has completed KYC.
- Mock serverhttps://docs.banxa.com/_mock/products/hosted-checkout/openapi/{partner}/v2/sell
- https://api.banxa.comhttps://api.banxa.com/{partner}/v2/sell
curl -i -X POST \
'https://docs.banxa.com/_mock/products/hosted-checkout/openapi/{partner}/v2/sell' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'x-api-key: string' \
-d '{
"paymentMethodId": "string",
"crypto": "string",
"blockchain": "string",
"fiat": "string",
"fiatAmount": "string",
"cryptoAmount": "string",
"walletAddress": "string",
"redirectUrl": "string",
"subPartnerId": "string",
"metadata": "string",
"externalCustomerId": "string",
"externalOrderId": "string"
}'- Result
- test
"{\n \"checkoutUrl\": \"https://partner.banxa.com/portal?expires=xxx&oid=xxx&signature=xxx\",\n \"id\": \"191fa5b4b1f45e1cf784422e09317d56\", // This is the Banxa defined Order ID\n \"externalOrderId\": \"a4b427ccb872a1744b317456bd0d165f\", // If not provided, then this value will be null\n \"externalCustomerId\": \"awasdf-fg34fg-34hhsdf\",\n \"fiat\": \"CAD\",\n \"fiatAmount\": \"1000.00\",\n \"crypto\": \"USDC\",\n \"cryptoAmount\": null, // If not provided, then this value will be null.\n \"blockchain\": \"TRON\"\n}"