Docs

Developers / Travel Rule

Overview

Ospree’s Travel Rule Module is a standalone solution that helps crypto businesses automate the review and approval of incoming and outgoing transfers. It combines real-time checks—including blockchain analytics, jurisdictional thresholds, wallet-type identification, and Travel Rule data validation, to help ensure that each transaction meets applicable regulatory requirements before processing.

Through its interoperability capabilities, the module supports the secure exchange of Travel Rule information across different platforms and protocols. It can operate independently or integrate with other Ospree tools and external solutions, enabling businesses to strengthen compliance without disrupting their existing systems.

Instructions and records

Every transfer is either an instruction or a record. An instruction is sent to the counterparty VASP over the protocol you name in protocol, and the counterparty answers it. A record is kept for your own compliance file only: nothing is sent and no protocol is used. To create a record, send "is_record": true.

Ospree works out the transfer type from the request. The transfer_type field in the create request is deprecated and ignored. See Transfer Type.

Required fields and idempotency

Every create request needs amount, originator_address and originator_account_reference_id. The originator account reference is always required, even when you also send the originator’s details in originator_account. On the beneficiary side the reference is optional: you can reference an existing account with beneficiary_account_reference_id or describe the beneficiary in beneficiary_account.

reference_id is your idempotency key. If you send a reference_id you have already used, Ospree creates nothing and returns the original transfer with 200 OK and the header Idempotent-Replayed: true. A new transfer returns 201 Created. A request without a reference_id is never treated as a repeat.

Account Categories and Type

When initiating a Travel Rule transfer, the originator and beneficiary roles must be clearly defined to meet regulatory requirements. These roles ensure that all necessary data is collected, structured, and transmitted in accordance with compliance standards.

In Ospree, each party can have one of two account categories:

  • Customer: An individual or entity that your business has fully onboarded. This is the default when you leave account_category out.

  • Non-Customer: An individual or entity that your business has not onboarded but who takes part in the transaction.

Each party also has an account type:

  • Individual: A natural person acting on their own behalf.

  • Entity: A legal organization such as a business, institution, or government body.

Travel Rule transfers in Ospree can involve any combination of account category and account type:

JavaScript · Sample data

"originator_account": {
"account_type": "individual", // "individual" or "entity"
"account_category": "customer", // "customer" (default) or "non-customer"
// ...

JavaScript · Sample data

"beneficiary_account": {
"account_type": "individual", // "individual" or "entity"
"account_category": "non-customer", // "customer" (default) or "non-customer"
// ...

Using Unique Account IDs for Originator and Beneficiary

When initiating a Travel Rule transfer, information about both the originator and beneficiary is required. This data can either be included directly in the transfer request or referenced using a unique account ID already stored in the system. The fields originator_account_reference_id and beneficiary_account_reference_id link to pre-registered accounts, simplifying repeat transactions and ensuring consistency. originator_account_reference_id is required on every request; beneficiary_account_reference_id is optional.

JSON · Sample data

{
// ...
"originator_account_reference_id": "random-ref-id-101",
"beneficiary_account_reference_id": "random-ref-id-102",
// ...

Direct Input for Originator and Beneficiary

Direct Input refers to the method of providing the originator and beneficiary information directly within the Travel Rule transfer request. This includes personal or entity details such as names, addresses, and identification data. While this approach allows for flexibility, especially when dealing with one-time or ad hoc transfers, it can lead to data duplication and a higher risk of errors or inconsistencies. It’s best suited for scenarios where the account information is not expected to be reused or when the account has not yet been registered in the system.

Depending on the sending and receiving jurisdictions, the information required in a Travel Rule transfer may vary to meet local regulatory requirements. The name fields also differ between individuals and entities:

  • Individuals use name_first, name_middle and name_last. name_last is required.

  • Entities use name_legal (the legal name, required), name_business (the short name) and name_trading (the trading name).

  • name_type is required and must be LEGL.

JavaScript · Sample data

// ...
"individual": {
"individual_name": {
"name_type": "LEGL",
"name_first": "Mark",
"name_last": "Rover"
}
}
},
// ...

JavaScript · Sample data

// ...
"entity": {
"entity_name": {
"name_type": "LEGL",
"name_legal": "Digital Capital Pte. Ltd.",
"name_business": "Digital Capital",
"name_trading": "DigiCap"
}
}
},
// ...

Self Hosted Wallets

A self-hosted wallet (also known as a non-custodial wallet) is a cryptocurrency wallet where the user controls the private keys. Examples include MetaMask, Ledger, or mobile wallets like Trust Wallet. Declaring whether a wallet is self-hosted during a Travel Rule transfer is important, as certain jurisdictions have specific rules for transfers to and from these wallets, such as asking the holder to prove control of the address.

In Ospree, Travel Rule transfers can originate from or be sent to both hosted and self-hosted wallet addresses. You declare this with the fields originator_address_is_self_hosted and beneficiary_address_is_self_hosted.

A transfer with a self-hosted leg is always a record: send "is_record": true and leave out protocol. A self-hosted wallet has no counterparty VASP to send the transfer to, so a request with a self-hosted leg and no is_record is rejected with 422.

JSON · Sample data

{
// ...
"is_record": true,
"originator_address": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy",
"originator_address_is_self_hosted": false, // true or false
// ...
"beneficiary_address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"beneficiary_address_is_self_hosted": true, // true or false
// ...
}

Note that Ospree does not support both the originator and beneficiary addresses being self-hosted.

JSON · Sample data

{
// THIS IS NOT SUPPORTED, ONLY ONE ADDRESS IS ALLOWED TO BE SELF-HOSTED
// ...
"originator_address_is_self_hosted": true,
// ...
"beneficiary_address_is_self_hosted": true,
// ...
}

Send crypto to a user’s self-hosted wallet (Self-Hosted Wallet Withdrawal)

Self-hosted wallet transfers, incoming or outgoing, are always created by your own VASP as a record. Do not send a VASP ID for the self-hosted leg. Ospree assigns the reserved SLFHST VASP ID to that leg automatically, and your own VASP is used for the other leg. Sending SLFHST yourself, or any VASP ID on a self-hosted leg, is rejected with 422.

A customer of VASP A wants to withdraw crypto to their self-hosted wallet (e.g., MetaMask). Although the beneficiary address isn’t managed by another VASP, VASP A is still required to create a Travel Rule record of the transaction. This ensures compliance and auditability, particularly in jurisdictions where self-hosted wallet activity must be tracked or verified.

JSON · Sample data

{
// VASP IDs are assigned automatically. Do not send them.
// ...
"is_record": true,
// originator VASP: your own VASP (assigned automatically)
"originator_address": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy",
"originator_address_is_self_hosted": false,
// ...
// beneficiary VASP: SLFHST (assigned automatically, do not send)
"beneficiary_address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"beneficiary_address_is_self_hosted": true,
// ...
}

Receive crypto from a user’s self-hosted wallet (Self-Hosted Wallet Deposit)

If the same customer of VASP A wants to deposit crypto from their self-hosted wallet, VASP A still creates the Travel Rule record.

JSON · Sample data

{
// VASP IDs are assigned automatically. Do not send them.
// ...
"is_record": true,
// originator VASP: SLFHST (assigned automatically, do not send)
"originator_address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"originator_address_is_self_hosted": true,
// ...
// beneficiary VASP: your own VASP (assigned automatically)
"beneficiary_address": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy",
"beneficiary_address_is_self_hosted": false,
// ...
}