Skip to main content

Create private transaction

After a successful call of createPrivateSendTransaction method, you get a unique ID to track the transaction status and a payin address for user to send money to.

info

The amount value should be understood as an expected payout amount to the user before withholding the serviceFee.

HTTP request

post/v2/#createPrivateSendTransaction

Request

Header parameters

Requires authentication.

Body parameters

Requires JSON-RPC 2.0 protocol request body.

The params parameter schema:

NameTypeRequiredDescription
currencystringtrueCurrency ticker (in lowercase).
amountstringtrueAmount of currency that user is going to send.
addressstringtrueRecipient address.
addressExtraIdstringfalseAdditional ID for address for currencies that use additional ID for transaction processing.
userMetadatastringfalseEscaped JSON.
You can use userMetadata to include any additional parameters for customization purposes.
To use this feature, please contact us at [email protected].
Sample request payload
application/json
{
"jsonrpc": "2.0",
"id": "test",
"method": "createPrivateSendTransaction",
"params": {
"currency": "eth",
"address": "<<valid eth address>>",
"amount": "0.2934325"
}
}
Sample cURL
curl --location --request POST 'https://api.changelly.com/v2' \
--header 'X-Api-Key: {{apiKey}}' \
--header 'X-Api-Signature: {{sign}}' \
--data-raw '{
"jsonrpc": "2.0",
"id": "test",
"method": "createPrivateSendTransaction",
"params": {
"currency": "eth",
"address": "<<valid eth address>>",
"amount": "0.2934325"
}
}'

Response

Response parameters

Requires JSON-RPC 2.0 protocol response body.

The result parameter schema:

NameTypeDescription
idstringTransaction ID. Could be used in getStatus method.
currencystringPayin currency ticker.
amountstringThe estimated payout amount before withholding the network fee.
payoutAddressstringRecipient address.
addressExtraIdstringAdditional ID for address for currencies that use additional ID for transaction processing.
payinAddressstringAddress for a user to send coins to.
payinExtraIdstringAdditional ID for payinAddress in case it is required.
Note: If the payinExtraId parameter is returned in the response and is not null, it is required for user to send the funds to the payinAddress specifying extraId. Otherwise, the transactions will not be processed and the user will need to get a refund through technical support.
statusstringTransaction status. Will always be new when transaction is created.
serviceFeestringCommission taken by Changelly and the network from the amount sent to the user. Displayed in payout currency.
createdAtintegerTime in timestamp format (microseconds) when the transaction was created.
Sample response
application/json
{
"jsonrpc": "2.0",
"id": "test",
"result": {
"id": "uiib******khs9n",
"currency": "eth",
"amount": "0.2934325",
"payoutAddress": "0x576e****************1499a9",
"payinAddress": "0x0c7c****************e318ea",
"status": "new",
"serviceFee": "0.00009",
"createdAt": 1657278685000000
}
}

Error response

Error response parameters

Check the error response schema.

Error codes

CodeMessageDescription
-32601Method not foundThe method you're calling doesn't exist.
-32602Invalid amount. {limit_type} amount is {limit} {currency}The attempt to send currency out of limits. {limit_type} is a “Minimal“ or “Maximum“ value.
-32602Invalid currency: {currency} temporary disabledThis currency is currently disabled.
-32602Invalid currency: {currency} not foundThis currency is not listed on Changelly or the ticker is invalid.
-32602Invalid {param}You've specified an invalid parameter.
-32602Invalid paramsYou haven't specified a few required parameters.
-32602Invalid payout addressYou've specified an invalid payout address.
-32602Not enough liquidity. Max amount is {max} {currency}.The amount you've specified exceeds maximal volume.
-32603Error: You reached requests limit {limit} rpsYou have sent requests more than the RPS limit. The default RPS limit is 10.
-32603Internal Error or ErrorMost likely, the problem is on our side. Further investigation is required.
-32603An error encountered during address generation. Please try again laterAn error occurred during address generation.