Defy Version 2.0
  • 🏁Getting Started
    • Overview
  • πŸ”‘AUTHENTICATION
    • API Key
  • πŸ”„Streaming
    • What is streaming?
    • Streaming API
  • πŸ›‘οΈLive AML
    • What is Live AML?
    • Live AML API
  • πŸ”Security
    • Anti Money Laundering (AML)
    • Transaction Detail
  • 🏎️Travel Rule
    • What is Travel Rule?
    • Withdrawal Interactions
    • Deposit Interactions
    • E-Mail Notification
    • Status and Webhook Data
    • API Reference
  • πŸ‘©β€πŸ’»Developer Resources
    • Supported Chains
Powered by GitBook
On this page
  • Create Transaction
  • Send Transaction Hash
  • List Available VASPs
  • Send Wallet Address
  • Receive Transaction Without Protocol
  • Notes

Was this helpful?

  1. Travel Rule

API Reference

All services for Travel Rule are listed here. You can search for services from the indicator on the right.

Create Transaction

POST /travelrule/create_tx

This service is there to allow you to create a transaction when sending money of the endpoint. The originator data must definitely include the name and wallet address. In the originator data, you must send one of the following data: date of birth, identity information, address or customer number. On the beneficiary side, it is sufficient to send only the name and wallet address data.

Body

Name
Type
Description

transaction_ref

string

Transaction reference number from your system. (Required)

transaction_asset

string

Asset Symbol (Required)

transaction_network

string

Asset Network

transaction_amount

string

Asset Amount (Required)

transaction_asset_decimals

string

Asset Decimals (Required)

originator

object

Originator Data (Required)

persons

array

Originator Person Data (Required)

name

object

Originator Person Name (Required)

dateAndPlaceOfBirth

object

Originator Person birthplace or birthday

nationalIdentifier

object

Originator Person national identifier

customerIdenficiation

object

Originator Person customer ID

geographicAddress

object

Originator Person's Address

accountNumber

array

Originator Wallet Address (Required)

beneficiary

object

Beneficiary Data (Required)

persons

array

Beneficiary Person Data (Required)

name

object

Beneficiary Person Name (Required)

dateAndPlaceOfBirth

object

Beneficiary Person birthplace or birthday

nationalIdenficiation

object

Beneficiary Person national identifier

customerIdenficiation

object

Beneficiary Person customer ID

geographicAddress

object

Beneficiary Person's Address

accountNumber

array

Beneficiary Wallet Address (Required)

const axios = require('axios');

const data = JSON.stringify({
    "transaction_ref": "a4de3f3f-668f-4844-995a-03ad1b73a52f",
    "transaction_asset": "ETH",
    "transaction_amount": "20000000000000000000", 
    "transaction_asset_decimals": "18",
    "beneficiary_vasp_id": "3651dcbf-b41f-4f68-b79b-7ce794caf233",
    "originator": {
        "persons": [
            {
                "naturalPerson": {
                    "name": {
                        "nameIdentifier": [
                            {
                                "primaryIdentifier": "Merve",
                                "secondaryIdentifier": "GΓΌler",
                                "nameIdentifierType": "LEGL"
                            }
                        ]
                    },
                    "dateAndPlaceOfBirth": {
                        "dateOfBirth": "1990-02-24",
                        "placeOfBirth": "Singapore"
                    },
                    "nationalIdentification": {
                        "nationalIdentifier": "12345678910",
                        "nationalIdentifierType": "CCPT",
                        "countryOfIssue": "TR"
                    },
                    "geographicAddress": [
                        {
                            "addressType": "GEOG",
                            "streetName": "Potential Street",
                            "buildingNumber": "123",
                            "buildingName": "Cheese Hut",
                            "postCode": "91361",
                            "townName": "Thousand Oaks",
                            "countrySubDivision": "California",
                            "country": "US"
                        }
                    ],
                    "customerIdentification": "01010101"
                }
            }
        ],
        "accountNumber": [
            "0x1d0d2d8c85441050abc9eb654399fa198fbd5720"
        ]
    },
    "beneficiary": {
        "persons": [
            {
                "naturalPerson": {
                    "name": {
                        "nameIdentifier": [
                            {
                                "primaryIdentifier": "Merve",
                                "secondaryIdentifier": "GΓΌler",
                                "nameIdentifierType": "LEGL"
                            }
                        ]
                    }
                }
            }
        ],
        "accountNumber": [
            "0x1d0d2d8c85441050abc9eb654399fa198fbd5722"
        ]
    }
});

const config = {
  method: 'post',
  url: 'https://api.getdefy.co/v2/travelrule/create_tx',
  headers: { 
    'Content-Type': 'application/json', 
    'apikey': 'APIKEY'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
{
    "code": 0,
    "message": "OK",
    "data": "PENDING"
}

Send Transaction Hash

POST /travelrule/send_tx_hash

This service is sending transaction hash to us for travel rule protocol.

Body

Name
Type
Description

transaction_ref

string

Your transaction reference number. (Required)

transaction_hash

string

On-Chain Transaction Hash (Required)

const axios = require('axios');

const data = JSON.stringify({
  "transaction_ref": "a4de3f3f-668f-4844-995a-03ad1b73a54d",
  "transaction_hash": "0xETH"
});

const config = {
  method: 'post',
  url: 'https://api.getdefy.co/v2/travelrule/send_tx_hash',
  headers: { 
    'Content-Type': 'application/json', 
    'apikey': 'APIKEY'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
{
    "code": 0,
    "message": "OK",
    "data": null
}

List Available VASPs

GET /travelrule/list_vasps

This service is listing available vasps for travel rule withdrawal.

const axios = require('axios');

const config = {
  method: 'get',
  url: 'https://api.getdefy.co/v2/travelrule/list_vasps?page=1&limit=10',
  headers: { 
    'apikey': 'APIKEY'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
{
    "code": 0,
    "message": "OK",
    "data": [
        {
            "uid": "acb4b639-3709-4571-a3cf-e3f2d3991421",
            "name": "BitPreco",
            "legal_name": "Cbtc Servicos Digitais LTDA",
            "country": "BR",
            "website": "https://bitpreco.com"
        },
        {
            "uid": "15291543-677a-4d1e-a147-e184a922be74",
            "name": "Buda",
            "legal_name": "SURBTC SpA",
            "country": "CL",
            "website": "https://www.buda.com/"
        },
        {
            "uid": "bfd1a0d0-4229-48dc-a671-befaed4efaaf",
            "name": "BTCC US",
            "legal_name": "BTCC USA Limited",
            "country": "US",
            "website": "https://www.btcc.com/en-US"
        },
        {
            "uid": "a9c9bed7-615a-4322-9ac6-fd57b7ac6b98",
            "name": "BTC Markets",
            "legal_name": "BTC Markets Pty Ltd",
            "country": "AU",
            "website": "https://www.btcmarkets.net"
        },
        {
            "uid": "1fa438e0-04ca-4f9d-92fb-463f2d8248e9",
            "name": "TOPBTC",
            "legal_name": null,
            "country": null,
            "website": "https://www.topbtc.com"
        },
        {
            "uid": "77a3a254-4a9f-45b5-a50a-e2621f8c56f1",
            "name": "BITPESA",
            "legal_name": "BTC AFRICA SA",
            "country": "KE",
            "website": "https://bitpesa.co"
        },
        {
            "uid": "9a515f3c-e6f9-4e58-ab17-f0de6a0ffff9",
            "name": "BTC-Alpha",
            "legal_name": "BTC-Alpha",
            "country": "GB",
            "website": "https://btc-alpha.com"
        },
        {
            "uid": "8588c632-8038-4f9e-a681-9036d7a055c1",
            "name": "BTCC.com",
            "legal_name": "BTCC Lithuania Limited UAB",
            "country": "LT",
            "website": "https://btcc.com"
        },
        {
            "uid": "57a9095a-ee48-46e5-b72c-2f4688f2dbb8",
            "name": "BtcTurk | Pro",
            "legal_name": "Eliptik Yazilim ve Ticaret",
            "country": "TR",
            "website": "https://pro.btcturk.com"
        },
        {
            "uid": "a86e5408-fb3b-42a6-9761-5dc8996b285e",
            "name": "BTCTurk",
            "legal_name": null,
            "country": "tr",
            "website": "https://webhook.site/ca1e089b-326a-4c7a-8511-6ca5e2756125"
        }
    ],
    "page_count": 3
}

Send Wallet Address

POST /travelrule/send_address

This service is sending wallet address to us for travel rule protocol.

Body

Name
Type
Description

transaction_ref

string

Your transaction reference number. (Required)

address

string

Wallet Address (Required)

const axios = require('axios');

const data = JSON.stringify({
  "transaction_ref": "a4de3f3f-668f-4844-995a-03ad1b73a54d",
  "address": "0x1d0d2d8c85441050abc9eb654399fa198fbd5722"
});

const config = {
  method: 'post',
  url: 'https://api.getdefy.co/v2/travelrule/send_address',
  headers: { 
    'Content-Type': 'application/json', 
    'apikey': 'APIKEY'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
{
    "code": 0,
    "message": "OK",
    "data": null
}

Receive Transaction Without Protocol

POST /travelrule/receive_tx_without_protocol

This service is there to allow you to receive a transaction when without protocol.

const axios = require('axios');

const data = JSON.stringify({
  "transaction_ref": "a4de3f3f-668f-4844-995a-03ad1b73a51f",
  "transaction_asset": "ETH",
  "transaction_hash": "0xTest",
  "transaction_amount": "20000000000000000000",
  "transaction_asset_decimals": "18",
  "originator": {
    "persons": [
      {
        "naturalPerson": {
          "name": {
            "nameIdentifier": [
              {
                "primaryIdentifier": "Merve",
                "secondaryIdentifier": "GΓΌler",
                "nameIdentifierType": "LEGL"
              }
            ]
          },
          "dateAndPlaceOfBirth": {
            "dateOfBirth": "1990-02-24",
            "placeOfBirth": "Singapore"
          },
          "nationalIdentification": {
            "nationalIdentifier": "12345678910",
            "nationalIdentifierType": "CCPT",
            "countryOfIssue": "TR"
          },
          "geographicAddress": [
            {
              "addressType": "GEOG",
              "streetName": "Potential Street",
              "buildingNumber": "123",
              "buildingName": "Cheese Hut",
              "postCode": "91361",
              "townName": "Thousand Oaks",
              "countrySubDivision": "California",
              "country": "US"
            }
          ],
          "customerIdentification": "01010101"
        }
      }
    ],
    "accountNumber": [
      "0x1d0d2d8c85441050abc9eb654399fa198fbd5722"
    ]
  },
  "beneficiary": {
    "persons": [
      {
        "naturalPerson": {
          "name": {
            "nameIdentifier": [
              {
                "primaryIdentifier": "Merve",
                "secondaryIdentifier": "GΓΌler",
                "nameIdentifierType": "LEGL"
              }
            ]
          }
        }
      }
    ],
    "accountNumber": [
      "0x1d0d2d8c85441050abc9eb654399fa198fbd5722"
    ]
  },
  "created_at": "2025-02-10T14:16:03.544Z"
});

const config = {
  method: 'post',
  url: 'https://api.getdefy.co/v2/travelrule/receive_tx_without_protocol',
  headers: { 
    'apikey': 'APIKEY'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
{
    "code": 0,
    "message": "OK",
    "data": "APPROVED"
}

Notes

  • You need to enter the network parameter to get clearer data. If you do not enter the network parameter, we add the default network according to the wallet address.

PreviousStatus and Webhook DataNextSupported Chains

Last updated 14 days ago

Was this helpful?

🏎️