Creating Payouts

Validate Addresses Before Making Requests

Before making an API call to create a payout, we highly recommend pre-validate the destination address format to reduce the number of errors.

It is recommended because users sometimes submit wrong addresses e.g. xyz - in such a case, the API call will result in the following error message from our API:

{
  "errorList": [
    {
      "parameter": "payOutInstruction",
      "code": "invalidPayout",
      "message": "Invalid Instruction for Payout"
    }
  ]
}

Please use the following endpoint to pre-validate addresses before making your POST /api/v1/pay/summary call:

Use Unique References

When creating payout transactions, make sure that you use a unique value in the reference field for your POST /api/pay/summary call. Otherwise, the API responds with a relevant error message:

{
  "errorList": [
    {
      "parameter": "reference",
      "code": "unique",
      "message": "Duplicate Reference"
    }
  ]
}

Examples

Below you can see Payout cURL examples for each one of the cryptocurrencies that Coindirect supports.

curl -X "POST" "https://api.sandbox.coindirect.com/api/v1/pay/summary" \
     -H 'Authorization: Hawk id="cs32OwgPsxZIB642vqiclSFGBClYJ9LjVpq7n8xFKoytc8Fn9xRZBAuUQ4uRvOMe", ts="1635329987", nonce="hUynKW", mac="NdMhfo+IKhSrkLEpH94WtEMtjL1YVq1+lRxDChSZXfU="' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "amount": 40,
  "currency": "EUR",
  "reference": "c0a1a9ce-ce38-4c6e-aafb-8eba2d9cd38e",
  "type": "OUT",
  "merchantId": "9a57c17a-1eef-48ff-83d0-b5892c99f767",
  "payOutDetails": {
    "address": "n35VHa8NZj7mtqQApxsyh1hiCjrGHkojwU",
    "currency": "BTC",
    "code": "crypto"
  }
}'
curl -X "POST" "https://api.sandbox.coindirect.com/api/v1/pay/summary" \
     -H 'Authorization: Hawk id="cs32OwgPsxZIB642vqiclSFGBClYJ9LjVpq7n8xFKoytc8Fn9xRZBAuUQ4uRvOMe", ts="1635330255", nonce="0T7Ynn", mac="WpvsRJmKIgS/2xaM5Sfj7U7Tr3cuRFHaxIcT/A4ugP8="' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "amount": 40,
  "currency": "EUR",
  "reference": "df58eff9-76bc-4fd7-b7a5-3bdfbb003c95",
  "type": "OUT",
  "merchantId": "9a57c17a-1eef-48ff-83d0-b5892c99f767",
  "payOutDetails": {
    "address": "0xc70a3deb2971346544c87e77c1736757e889619f",
    "currency": "ETH",
    "code": "crypto"
  }
}'
curl -X "POST" "https://api.sandbox.coindirect.com/api/v1/pay/summary" \
     -H 'Authorization: Hawk id="cs32OwgPsxZIB642vqiclSFGBClYJ9LjVpq7n8xFKoytc8Fn9xRZBAuUQ4uRvOMe", ts="1635330335", nonce="8rn3EW", mac="FSQBKhmNS2i7AHJwSseMN4xG9lBmHtL5vtJyplbBEoQ="' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "amount": 40,
  "currency": "EUR",
  "reference": "1cc36035-6003-4ce2-8bd0-1026eb529f1a",
  "type": "OUT",
  "merchantId": "9a57c17a-1eef-48ff-83d0-b5892c99f767",
  "payOutDetails": {
    "code": "crypto",
    "currency": "USDT",
    "protocol": "ERC20",
    "address": "0xc70a3deb2971346544c87e77c1736757e889619f"
  }
}'

When creating USDT payouts, please specify the protool. Sending USDT to the wrong network will result in a total loss of your funds.

curl -X "POST" "https://api.sandbox.coindirect.com/api/v1/pay/summary" \
     -H 'Authorization: Hawk id="cs32OwgPsxZIB642vqiclSFGBClYJ9LjVpq7n8xFKoytc8Fn9xRZBAuUQ4uRvOMe", ts="1635330425", nonce="nIzpGz", mac="QCSfAy0jAFChtAoGlW8TwfwtjYtcxpfkrABWXilLzVI="' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "amount": 40,
  "currency": "EUR",
  "reference": "458bc2d4-6930-4695-8a2a-98ed8cf5a15f",
  "type": "OUT",
  "merchantId": "9a57c17a-1eef-48ff-83d0-b5892c99f767",
  "payOutDetails": {
    "code": "crypto",
    "currency": "USDT",
    "protocol": "TRC20",
    "address": "TSs236UfPMeKzrjTdUarS6UzhfqEtmnc5N"
  }
}'

When creating USDT payouts, please specify the protool. Sending USDT to the wrong network will result in a total loss of your funds.

curl -X "POST" "https://api.sandbox.coindirect.com/api/v1/pay/summary" \
     -H 'Authorization: Hawk id="cs32OwgPsxZIB642vqiclSFGBClYJ9LjVpq7n8xFKoytc8Fn9xRZBAuUQ4uRvOMe", ts="1635330565", nonce="u7UlKG", mac="0JLDKASX1tuVVWGYSuvu7WAJZK9AuaGRoqo/Mfk+jT0="' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "amount": 40,
  "currency": "EUR",
  "reference": "7a3a3848-d63c-42bb-ac10-a414a6120091",
  "type": "OUT",
  "merchantId": "9a57c17a-1eef-48ff-83d0-b5892c99f767",
  "payOutDetails": {
    "address": "rh6X8bZXE49xZhNwVx47K6Q6px7nDhaAdy?dt=778415029",
    "currency": "XRP",
    "code": "crypto"
  }
}'

When creating XRP payouts, please specify a Destination Tag as well by appending to the "address" value via + "?dt=".

If a recipient has no destination tag, just pass "?dt=0"

Destination tags indicate the beneficiary or destination for a payment. For example, a payment to an exchange or gateway address can use a destination tag to indicate which customer to credit for the amount of the payment in that business's own systems. A payment to a merchant could indicate what item or cart the payment is buying.

curl -X "POST" "https://api.sandbox.coindirect.com/api/v1/pay/summary" \
     -H 'Authorization: Hawk id="cs32OwgPsxZIB642vqiclSFGBClYJ9LjVpq7n8xFKoytc8Fn9xRZBAuUQ4uRvOMe", ts="1635331929", nonce="PbUspr", mac="ygaoiyuVGgDAqbDcteuWhyzP9lotrWQVnjfM3+NWbsc="' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "amount": 40,
  "currency": "EUR",
  "reference": "348ed126-ef2e-4172-92cc-cac40346eb95",
  "type": "OUT",
  "merchantId": "9a57c17a-1eef-48ff-83d0-b5892c99f767",
  "payOutDetails": {
    "address": "n4G35xtFfQTr6SkoGytj2Hin9q5DSVjJWp",
    "currency": "LTC",
    "code": "crypto"
  }
}'
curl -X "POST" "https://api.sandbox.coindirect.com/api/v1/pay/summary" \
     -H 'Authorization: Hawk id="cs32OwgPsxZIB642vqiclSFGBClYJ9LjVpq7n8xFKoytc8Fn9xRZBAuUQ4uRvOMe", ts="1635332133", nonce="fqvmdC", mac="ocp7mmeb6I6RrfqCYlIsWqT9aWlriljqTKt9mqc1aGo="' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "amount": 40,
  "currency": "EUR",
  "reference": "1fe8f8a8-6b2c-4e7b-8cdf-9d3a9e8b3f09",
  "type": "OUT",
  "merchantId": "9a57c17a-1eef-48ff-83d0-b5892c99f767",
  "payOutDetails": {
    "address": "pqkx2ntjpuwcrg9k0lt2m9eud8chne7exu3g539wcs",
    "currency": "BCH",
    "code": "crypto"
  }
}'
curl -X "POST" "https://api.sandbox.coindirect.com/api/v1/pay/summary" \
     -H 'Authorization: Hawk id="cs32OwgPsxZIB642vqiclSFGBClYJ9LjVpq7n8xFKoytc8Fn9xRZBAuUQ4uRvOMe", ts="1635332323", nonce="wFn8YN", mac="zi150NTgWWmBYXobcTF//yoVQGmTkD/IUfAv7FBEwko="' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "amount": 40,
  "currency": "EUR",
  "reference": "ee0f73b2-3518-45cc-a0d2-880e3bdc41b4",
  "type": "OUT",
  "merchantId": "9a57c17a-1eef-48ff-83d0-b5892c99f767",
  "payOutDetails": {
    "address": "0x55b586e96fd4791d9c4e2cb44529e102cefb2a6c",
    "currency": "DAI",
    "code": "crypto"
  }
}'
curl -X "POST" "https://api.coindirect.com/api/v1/pay/summary" \
     -H 'Authorization: Hawk id="lEHyAT9OIOzcplwnwDRTOZJu9BAG75Zuy82lzZzvh0jsxinXGho1mQJmO1Y50sKY", ts="1635332467", nonce="a1LLAL", mac="oqTXjLwv42Hz+0R4KTeQFHJ17VUrOuAXPhiEJSBCwbA="' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "amount": 40,
  "currency": "EUR",
  "reference": "9c362dd7-dbbf-4aca-8f4b-4aa1e8227c17",
  "type": "OUT",
  "merchantId": "82737577-ae9a-4305-a544-61bef6681f0c",
  "payOutDetails": {
    "address": "D5RKmdm6tjc1vCWMEu4qBwhffk5XdkGkry",
    "currency": "DOGE",
    "code": "crypto"
  }
}'

Last updated