Get Payment Address for single NFT sales with native Tokens

Generate a payment address that can be used to mint a single NFT with a payment in ADA + any other Cardano Native Tokens

With this Curl request you will be able to create payment addresses for your customers that can be paid with Custom Native Tokens. This workaround does not use the prices in the pricelist of your project.

Curl request format

The curl request should be sent in the format shown below. Please keep in mint that every parameter that is specified needs to be specified with value in the curl request.

There is a technical required minimum of 5.5 ADA that needs to be charged with every Token payment.

The API is also not accounting for any decimal points that you have specified in the Token Registry.

curl -X 'GET' \
  'https://studio-api.nmkr.io/v2/GetPaymentAddressForRandomNftSale/<project_UID>/<Token_count>/<Lovelace>/127.0.0.1?referer=<referer>&customproperty=<custom_property>&optionalreceiveraddress=<receiver_address>&optionalpriceintokenpolicyid=<token_policy_Id>&optionalpriceintokenassetnameinhex=<assetname_in_HEX>&optionalpriceintokencount=<price_in_tokens>' \
  -H 'accept: text/plain' \
  -H 'Authorization: Bearer <your API Key>'

Curl request example

curl -X 'GET' \
  'https://studio-api.nmkr.io/v2/GetPaymentAddressForRandomNftSale/86ed0fa4-bb87-4ac7-95fa-f86140a175d7/1/5500000/127.0.0.1?optionalpriceintokenpolicyid=5dac8536653edc12f6f5e1045d8164b9f59998d3bdc300fc92843489&optionalpriceintokenassetnameinhex=4E4D4B52&optionalpriceintokencount=4' \
  -H 'accept: text/plain' \
  -H 'Authorization: Bearer <your API Key>'

Response

According to your specified parameters, the payment address would be given in the response to this curl. This address can now be used to mint the assets if the correct amount of ADA and custom native tokens is being sent to it.

{
  "paymentAddress": "addr1v908nestz7uz40xlyqhkmtr94vt7rj39ps2jugsr6s9y2tgk6q5u8",
  "paymentAddressId": 502211,
  "expires": "2023-09-17T14:52:49.459975+00:00",
  "adaToSend": "5.5",
  "debug": "",
  "priceInEur": 1.29,
  "priceInUsd": 1.38,
  "priceInJpy": 203.69,
  "priceInBtc": 5.1832554E-05,
  "effectivedate": "2023-09-17T14:03:41",
  "priceInLovelace": 5500000,
  "additionalPriceInTokens": [
    {
      "countToken": 4,
      "policyId": "5dac8536653edc12f6f5e1045d8164b9f59998d3bdc300fc92843489",
      "assetNameInHex": "4e4d4b52",
      "multiplier": 1,
      "totalCount": 4,
      "assetName": "NMKR",
      "decimals": 0
    }
  ],
  "sendbackToUser": 2000000
}