Integration examples
Creating a new transaction
The following example initiates a new outgoing Travel Rule transaction in full compliance with MiCA's Transfer of Funds Regulation (TFR).
First make sure you have your API key ready:
API_KEY='a70fcedf-416b-4f83-845c-a05aba0d7da4'
Then create a POST request against the CryptoSwift API, with the relevant data:
curl --location --request POST 'https://api.cryptoswift.eu/transactions' \ --header 'x-api-key: a70fcedf-416b-4f83-845c-a05aba0d7da4' \ --header 'Content-Type: application/json' \ --data-raw '{ "asset": "BTC", "amount": "0.00341", "blockchainInfo": { "transactionHash": "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16", "origin": "0xb794f5ea0ba39494ce839613fffba74279579268", "destination": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F", "destinationType": "CUSTODIAL" }, "vaspInfo": { "beneficiaryVaspName": "SwiftExchange", "beneficiaryVaspEmail": "info@SwiftExchange.domain" }, "originator": { "type": "NATURAL", "name": "Marwin Hillar", "accountNumber": "04143282398", "address": "Alexanderplatz 25, Berlin", "country": "Germany" }, "beneficiary": { "type": "NATURAL", "name": "Hanne Nikol", "accountNumber": "AB54234232" } }'
Key Data Points Explained
To begin with, please specify the asset (e.g., BTC, ETH) and the amount transferred in the transaction.
In the blockchainInfo and vaspInfo sections, include the essential data needed for us to effectively deliver the Travel Rule message to the beneficiary VASP:
- transactionHash: The unique identifier of the on-chain transaction.
- origin: The blockchain wallet address from which the transaction is initiated.
- destination: The blockchain wallet address to which the transaction is being sent.
- beneficiaryVaspName & beneficiaryVaspEmail: This information is crucial for delivering Travel Rule messages, especially if the wallet destination address is unknown to CryptoSwift or belongs to a VASP outside our network. With this information, we can contact the VASP, confirm address ownership, and grant them access. NB! You as a VASP are probably utilizing blockchain analytics tools to run AML checks before making the payment. These tools often provide the VASP name associated with the wallet address. When possible, please add this data to the outgoing Travel Rule message, as this greatly enhances the delivery rates of Travel Rule messages.
The originator and beneficiary sections should include all required data for both parties. Please note that the accountNumber for both the originator and beneficiary serves as the internal identifier used by the VASP to recognize the user. This could be the wallet address itself or another form of account identifier that is available.
For detailed requirements regarding originator and beneficiary information mandated by regulations, refer to our blog post on data requirements for the Travel Rule. If you don’t have all the necessary data available at the moment, you can still start the integration process. For guidance, check our blog post on iterative integration.
After you have sent the Travel Rule POST request, the API responds with the full data of the created Travel Rule transaction object, including the newly generated UUID of the transaction that can be used later to find or modify existing transaction data.
Receiving transaction data
When a Travel Rule transaction is sent out using CryptoSwift or a third party provider that is integrated with CryptoSwift, the beneficiary VASP is searched from the CryptoSwift database. If the VASP is found, they will automatically receive Travel Rule transaction message marked as INCOMING
(the ones sent out by originator VASP's are marked OUTGOING
). The incoming (and also outgoing) messages are stored and available in the CryptoSwift client dashboard.
Additionally you can set up webhooks to receive incoming Travel Rule transaction messages in real time to your application. See the webhooks section for more details.