Skip to main content

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

NameTypeDescriptionRequired
secretPhrasestringPayer's secret passphraseYes
recipientstringRecipient account ID or NXT addressYes
currencylongCurrency IDYes
unitsQNTlongAmount of units to payYes
feeRateQNTPerFXTlongTransaction fee rateOptional
deadlineintTransaction deadline in minutesOptional

Response

{
"transaction": "1234567890123456789",
"fullHash": "abc123...",
"errorCode": 0,
"errorDescription": ""
}

Error Handling

ErrorCondition
NOT_REGISTERED_MERCHANTRecipient is not a registered merchant
NOT_ENOUGH_CURRENCYSender has insufficient currency balance
UNKNOWN_CURRENCYCurrency 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"