CurrencyPayment
Submits a payment in currency to a registered merchant account. Unlike TransferCurrency, this requires the recipient to be a registered merchant.
Request
POST /nxt?requestType=currencyPayment
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
secretPhrase | string | Payer's secret passphrase | Yes |
recipient | string | Recipient account ID or NXT address | Yes |
currency | long | Currency ID | Yes |
unitsQNT | long | Amount of units to pay | Yes |
feeRateQNTPerFXT | long | Transaction fee rate | Optional |
deadline | int | Transaction deadline in minutes | Optional |
Response
{
"transaction": "1234567890123456789",
"fullHash": "abc123...",
"errorCode": 0,
"errorDescription": ""
}
Error Handling
| Error | Condition |
|---|---|
NOT_REGISTERED_MERCHANT | Recipient is not a registered merchant |
NOT_ENOUGH_CURRENCY | Sender has insufficient currency balance |
UNKNOWN_CURRENCY | Currency does not exist |
Example
curl -X POST http://localhost:22024/nxt \
-d "requestType=currencyPayment" \
-d "secretPhrase=your_phrase" \
-d "recipient=NXT-merchant_address" \
-d "currency=987654321" \
-d "unitsQNT=5000000000"