# トークンのランダム販売用にユニークなNMKRペイリンクを作成する

このエンドポイントを使用すると、NMKR Payを介したランダムトークンの購入プロセスの前に、独自のカスタムキューまたはホワイトリストシステムを柔軟に追加できます。

顧客が[NMKR Payを介して](https://docs.nmkr.io/nmkr-studio/set-up-sales/nmkr-pay)ランダムトークンを購入できるようにするユニークなランダム支払い取引を作成するには、APIエンドポイントを呼び出します：

```
/v2/CreatePaymentTransaction
```

#### Curlのリクエスト

NMKR APIと同様に、APIキー/認証トークンはヘッダで指定します：

さらに、「projectUid」（プロジェクトIDではない）と「nftUid」（トークンIDではない）とトークン数を指定します。

```json
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と[価格リストからの](https://docs.nmkr.io/nmkr-studio/set-up-sales/manage-prices-pricelist)トークンの価格によってプロジェクトを識別します。

フィールド「nmkrPayUrl」には、すべての[機能を](https://docs.nmkr.io/nmkr-studio/set-up-sales/nmkr-pay#nmkr-pay-vs.-pay-in-address)備えた[NMKR Pay](https://docs.nmkr.io/nmkr-studio/set-up-sales/nmkr-pay)経由でトークンを購入するための[ランダムな支払いリンクが](https://docs.nmkr.io/nmkr-studio/set-up-sales/nmkr-pay/set-up-nmkr-pay#share-the-payment-link-or-integrate-to-website)含まれるようになりました。

```json
{
    "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
}

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nmkr.io/jp/nmkr-studio-api/apino/i/tkunnorandamuniyunkunanmkrpeirinkuwosuru.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
