Create unique NMKR Pay Link for random Token sales

Create a Payment Link for random Token sales via NMKR Pay

With this endpoint you have the flexibility to add your own custom Queue or Whitelisting system in Front of the purchasing process of random tokens via NMKR Pay.

To create a unique random payment transaction that allows your customer to buy a random token via NMKR Pay, we call the API endpoint:

/v2/CreatePaymentTransaction

Curl request

As always with the NMKR API, the API Key / Authentication Token is given in the header: Further you specify the "projectUid" (not the Project ID) and also the "nftUid" (not the token ID) as well as the token count.

curl --location --request POST 'https://studio-api.nmkr.io/v2/CreatePaymentTransaction' \
--header 'authorization: <<api_key>>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "projectUid": "<<project_uid>>",
  "paymentTransactionType": "nmkr_pay_random",
  "customProperties": {},
 
  "paymentgatewayParameters": {
    
        "mintnfts":{
    "countNfts": 1
        }
  },
  "customerIpAddress": "0.0.0.0"
}'

Response

The response given by NMKR Studio will now identify the project by the UID and the price of the tokens from the pricelist. The field "nmkrPayUrl" now contains a random payment link to buy the Token via NMKR Pay with all its features.

{
    "paymentTransactionUid": "Tb38ed487c9274cd1b34266b40d97ea08",
    "projectUid": "05f6694c-a399-45fd-8dc4-d9fc9a7343b0",
    "paymentTransactionType": "nmkr_pay_random",
    "customProperties": {},
    "state": "prepared",
    "transactionParameters": null,
    "paymentTransactionCreated": "2022-12-01T00:49:18.158886+00:00",
    "paymentgatewayResults": {
        "priceInLovelace": null,
        "fee": null,
        "minUtxo": null,
        "mintNfts": {
            "countNfts": 1,
            "reserveNfts": []
        },
        "additionalPriceInTokens": []
    },
    "paymentTransactionSubStateResult": null,
    "auctionResults": null,
    "directSaleResults": null,
    "decentralParameters": null,
    "mintAndSendResults": null,
    "cbor": null,
    "signedCbor": null,
    "expires": null,
    "signGuid": null,
    "fee": null,
    "txHash": null,
    "nmkrPayUrl": "https://pay.nmkr.io/?mtid=Tb38ed487c9274cd1b34266b40d97ea08",
    "referencedTransaction": null,
    "customeripaddress": "0.0.0.0",
    "referer": null
}