Skip to content

Create NFT Order

Request

Allows your customer to create a Fiat to NFT 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.

Security
sec0
Headers
Acceptstring
Default:"application/json"
X-Request-Idstring

This is the correlation ID related to the request.

Bodyapplication/json
account_referencestringrequired

Unique customer reference provided by you to identify the order in our system

payment_method_idinteger, (int32)

Payment method ID associated with the order.

sourcestringrequired

Source currency code. i.e. USD, CAD etc.

source_amountstring

Source amount

targetstringrequired

Target cryptocurrency code. The cryptocurrency the NFT is listed in.

target_amountstring

Target amount. This will be overridden if a source_amount is also passed.

wallet_addressstringrequired

Wallet address to receive NFT.

blockchainstringrequired

Blockchain network code. If not provided, the default blockchain configured for the cryptocurrency will be used. Refer to the Get Crypto Currencies endpoint to retrieve a list of supported blockchain network codes.

return_url_on_successstringrequired

Return URL when the customer has completed the checkout process.

return_url_on_cancelledstring

Return URL when the customer cancels the checkout process.

return_url_on_failurestring

Return URL when the customer fails to complete the checkout process.

iframe_domainstring

Used if you are embedding an iFrame. This must be the exact domain where the iFrame will be hosted. e.g. [yourCompany].com. Do not include https:// in front of the domain.

meta_dataobject
curl -i -X POST \
  https://docs.banxa.com/_mock/products/legacy-api/openapi/api/orders/nft/buy \
  -H 'Accept: application/json' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -H 'X-Request-Id: string' \
  -d '{
    "account_reference": "string",
    "payment_method_id": 0,
    "source": "string",
    "source_amount": "string",
    "target": "string",
    "target_amount": "string",
    "wallet_address": "string",
    "blockchain": "string",
    "return_url_on_success": "string",
    "return_url_on_cancelled": "string",
    "return_url_on_failure": "string",
    "iframe_domain": "string",
    "meta_data": {
      "purchase_reference": "string",
      "nft": {
        "name": "string",
        "collection": "string",
        "media": {
          "type": "string",
          "link": "string"
        }
      }
    }
  }'

Responses

200

Bodyapplication/json
dataobject
Response
{ "data": { "order": {} } }