トークンのランダム販売用にユニークなNMKRペイリンクを作成する
NMKR Payでトークンをランダムに販売するための支払いリンクを作成する
このエンドポイントを使用すると、NMKR Payを介したランダムトークンの購入プロセスの前に、独自のカスタムキューまたはホワイトリストシステムを柔軟に追加できます。
顧客がNMKR Payを介してランダムトークンを購入できるようにするユニークなランダム支払い取引を作成するには、APIエンドポイントを呼び出します:
/v2/CreatePaymentTransaction
Curlのリクエスト
NMKR APIと同様に、APIキー/認証トークンはヘッダで指定します:
さらに、「projectUid」(プロジェクトIDではない)と「nftUid」(トークンIDではない)とトークン数を指定します。
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"
}'
応答
NMKR Studioから返される応答は、UIDと価格リストからのトークンの価格によってプロジェクトを識別します。
フィールド「nmkrPayUrl」には、すべての機能を備えたNMKR Pay経由でトークンを購入するためのランダムな支払いリンクが含まれるようになりました。
{
"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
}
最終更新