Ospree docs
API ReferenceWebsiteSocials
  • GETTING STARTED
    • Intro to Ospree
      • What is the Travel Rule?
      • Types of Travel Rule transfers
      • What is a wallet address?
      • What is an Account at Ospree?
      • What is a VASP or CASP?
    • Account
      • Understand user roles
      • Add and manage users
      • Change your password
      • Set up two-factor authentication (2FA)
      • Log in with 2FA-enabled
  • DASHBOARD
    • Overview
    • Travel Rule
      • Start a transfer
      • Search and filter transfers
      • Interoperability
      • Self-hosted wallets
    • Accounts Directory
      • Create an account
      • Edit an account
      • Create a recipient
      • Edit a recipient
      • Add a new wallet
      • VASPs
        • Search and filter
        • Request a VASP
  • OSPREE API
    • Overview
    • API integration flows
    • Authentication
    • Breaking Changes
    • Errors
    • Token Identifier
    • Webhooks
      • Webhook events
      • Webhook request
      • Webhook management
    • Travel Rule
      • Create Transfer
      • List Transfers
      • Retrieve Transfer
      • Update Transfer
      • Action Transfer
    • Accounts Directory
      • Create Account
      • List Accounts
      • Retrieve Account
      • Update Account
      • Remove account
      • Search account
      • Retrieve VASP
      • Search VASP
      • List VASPs
    • Blockchain Analytics
      • Create Address
      • List Addresses
      • Retrieve Address
      • Assign an address to account
      • Create Transaction (Beta)
      • List Transactions (Beta)
      • Retrieve Transaction (Beta)
  • Resources and Help
    • Data pre-validation
    • Sunrise Issue
Powered by GitBook
  1. OSPREE API

API integration flows

Last updated 22 days ago

This section provides guidance on VASP-to-VASP and self-hosted wallet integration flows. Please note that these are example flows provided for reference—you may adapt them as needed to align with your specific business processes and regulatory requirements.



  • (with intermediary)

  • (with intermediary and pre-populate customers information)


VASP-to-VASP Withdrawal

This flow outlines the process for initiating a Travel Rule crypto asset transfer from Virtual Asset Service Provider (VASP) A to VASP B. It includes the key steps required to collect and transmit originator and beneficiary information in line with applicable regulatory expectations.

  • Step 1: The user initiates a withdrawal request .

    • Reference previously created records using the following parameters (See Steps 3 to 4):

      • originator_account_reference_id

      • beneficiary_account_reference_id

Steps 3 to 4 – How to Create Accounts

  • Step 5: VASP A initiates the Travel Rule transfer via Ospree platform.

  • Step 6: Beneficiary VASP B validates the transfer details.

  • Step 7: Beneficiary VASP B responds to the transfer inquiry with either an approval or rejection.

  • Step 9: If the transfer is approved by Beneficiary VASP B, Originating VASP A executes the crypto asset transaction to the beneficiary address.

  • Step 10: Originating VASP A updates the transfer record with the transaction hash.

VASP-to-VASP Deposit

This flow outlines the steps involved when a VASP receives a crypto asset transfer initiated by another VASP. It includes how incoming transactions are detected, evaluated against compliance thresholds, and verified in accordance with Travel Rule requirements.

  • Step 1: VASP B initiates a Travel Rule transfer request to VASP A.

  • Step 3: VASP A inspects the transfer details and compares the transaction amount against a pre-set threshold rule based on local regulations.

    • (1) If the transaction exceeds the threshold: Verify whether Travel Rule data from the counterparty entity is included before processing the transfer.

      • If Travel Rule data is missing or does not match VASP A’s records, flag or block the incoming deposit.

      • If Travel Rule data is complete, proceed to the next standard compliance verification step, as defined in internal policies.

    • (2) If the transaction is within the allowed limit: The transfer proceeds without additional Travel Rule-related checks and moves to the next standard compliance verification step, as defined in internal policies.

  • Step 5: Ospree notifies VASP B of VASP A’s decision.

  • Step 6: If the transfer is approved by VASP A (the beneficiary), VASP B (the originator) executes the crypto asset transaction to the beneficiary address.

Self-Hosted Wallet Withdrawal

This flow outlines the process for managing crypto asset withdrawals to self-hosted wallets owned by VASP A’s customers. It includes steps for collecting user attestations and gathering relevant information to support internal compliance processes, including Travel Rule data collection when applicable.

  • Step 1: The user initiates a withdrawal request and inputs an address, indicating that it is a self-hosted wallet.

  • Step 2: The VASP requests an ownership attestation from the user.

  • Step 3: The user signs the attestation requested by the VASP.

VASP to Self-hosted
// Sample request

{
  "amount": 4.5, // Amount in the native asset (e.g., BTC)
  "dti": "4H95J0R2X", // DTI code representing Bitcoin
  "protocol": "flow", // Travel rule protocol used for the message transmission
  "reference_id": "transfer-0232434", // Unique reference ID for this transfer
  "beneficiary_vasp_id": "ZDQFVG", // 6-character VASP ID for the receiving VASP
  "originator_address": "3M219KR5vEneNb47ewrPfWyb5jQ2DjxRP6", // Wallet hosted by Originator VASP A
  "originator_address_is_self_hosted": false, // Indicates the sender wallet is hosted by the VASP
  "beneficiary_address": "bc1qa5wkgaew2dkv56kfvj49j0av5nml45x9ek9hz6", // Recipient wallet, self-hosted by the customer
  "beneficiary_address_is_self_hosted": true, // Indicates the beneficiary address is self-hosted
  "originator_account_reference_id": "random-ref-id-108", // Reference ID of the customer account (sender)
  "beneficiary_account_reference_id": "random-ref-id-108" // Same customer account acting as recipient
}
  • Step 5: Ospree confirms the Travel Rule transfer record.

  • Step 6: VASP A sends the crypto funds to the self-hosted address.

  • Step 7: VASP A updates transaction hash record.

Self-Hosted Wallet Deposit

This flow outlines the process for handling incoming crypto asset deposits from a customer’s self-hosted wallet. It includes steps for collecting user attestations, verifying whether the wallet has already been labeled as self-hosted, and gathering the necessary data to support the creation of a Travel Rule transfer record, when applicable.

  • Step 1: The user declares a self-hosted wallet address from which they plan to send funds to the VASP.

  • Step 2: The VASP requests an ownership attestation from the user.

  • Step 3: The user signs the attestation as requested by the VASP.

  • Step 4: The self-hosted wallet certificate or verification label is saved and associated with the address for future reference. This label allows future incoming transfers to verify whether the wallet is a self-hosted address or not.

  • Step 5: The user sends crypto funds from their self-hosted wallet to the VASP A.

Self-hosted to VASP
// Sample request

{
  "amount": 4.5, // Amount in the native asset (e.g., BTC)
  "dti": "4H95J0R2X", // DTI code representing Bitcoin
  "protocol": "flow", // Travel rule protocol used for the message transmission
  "reference_id": "transfer-0232434", // Unique reference ID for this transfer
  "beneficiary_vasp_id": "ZDQFVG", // 6-character VASP ID for the receiving VASP
  "originator_address": "bc1qa5wkgaew2dkv56kfvj49j0av5nml45x9ek9hz6",  // Originator wallet, self-hosted by the customer
  "originator_address_is_self_hosted": true, // Indicates the originator address is self-hosted
  "beneficiary_address": "3M219KR5vEneNb47ewrPfWyb5jQ2DjxRP6", // Wallet hosted by Originator VASP A
  "beneficiary_address_is_self_hosted": false, // Indicates the beneficiary wallet is hosted by the VASP A
  "originator_account_reference_id": "random-ref-id-108", // Reference ID of the customer account (sender)
  "beneficiary_account_reference_id": "random-ref-id-108" // Same customer account acting as recipient
}

VASP-to-VASP Withdrawal (# with intermediary)

This section outlines the flow and requirements for executing a VASP-to-VASP withdrawal that involves an intermediary party. This scenario typically occurs when a transaction passes through a third-party platform or custody service before reaching the final beneficiary VASP. Understanding this flow is essential for maintaining Travel Rule compliance, ensuring accurate data transmission, and minimizing delays in cross-jurisdictional transfers.

Note: In this flow, the intermediary refers to an infrastructure or service provider that a VASP relies on to host or facilitate the transfer of crypto assets on its behalf. This can include custody solutions, payment companies, OTC desks, asset managers, and other similar entities.

  • Step 1: The user initiates a withdrawal request

  • Step 2: The VASP A initiates a withdrawal request

  • Step 4: Create an account for the originator if it does not already exist.

  • Step 5: Create an account for the beneficiary if it does not already exist.

  • Step 6: Service Provider initiates the Travel Rule transfer via the Ospree platform.

  • Step 7: Beneficiary VASP B validates the Travel Rule transfer details.

  • Step 8: Beneficiary VASP B responds to the transfer inquiry with either an approval or rejection.

  • Step 10: If the transfer is approved by Beneficiary VASP B, Originating Service Provider executes the crypto asset transaction to the beneficiary address.

  • Step 11: Originating Services Provider updates the transfer record with the transaction hash.

VASP-to-VASP Withdrawal (# with intermediary and pre-populate customers information)

This section describes how to execute a VASP-to-VASP withdrawal that involves an intermediary and utilizes pre-populated customer account information. By leveraging the originator_account_reference_id and beneficiary_account_reference_id, you can streamline the transfer process while maintaining compliance. These reference IDs serve as persistent identifiers that link users to previously created accounts, allowing the system to automatically associate future transfers with the correct parties, without resubmitting full personal details each time. This approach reduces redundancy, improves efficiency, and ensures consistency across Travel Rule transactions.

Note: In this flow, the intermediary refers to an infrastructure or service provider that a VASP relies on to host or facilitate the transfer of crypto assets on its behalf. This can include custody solutions, payment companies, OTC desks, asset managers, and other similar entities.

  • Step 1: VASP A pre-populates customer and beneficiary information using Originator Account and Beneficiary Account.

  • Step 2: Ospree creates an account for the originator if it does not already exist.

  • Step 3: Ospree creates an account for the beneficiary if it does not already exist.

  • Step 4: The user initiates a withdrawal request.

  • Step 5: VASP A initiates a withdrawal request.

  • Step 7: Service Provider initiates the Travel Rule transfer via the Ospree platform.

  • Step 8: Beneficiary VASP B validates the Travel Rule transfer details.

  • Step 9: Beneficiary VASP B responds to the transfer inquiry with either an approval or rejection.

  • Step 11: If the transfer is approved by Beneficiary VASP B, Originating Service Provider executes the crypto asset transaction to the beneficiary address.

  • Step 12: Service Provider updates the transfer record with the transaction hash.

Step 2: In accordance with the Travel Rule, VASP A must share its customer information with VASP B—similar to the information-sharing process used in traditional banking. This includes details about both the originator and the beneficiary. To fulfill this requirement, VASP A uses the endpoint to initiate a Travel Rule transfer. VASP A has two options when populating the transfer request:

Include full details of the originator and beneficiary directly within the request body, or

Step 3: Create Originator Account — Use the endpoint to create a customer account representing the originator (sender). Include the required Travel Rule information such as name, wallet address, and residential or business address. Use the reference_id returned from this request as the originator_account_reference_id in the Create Transfer query.

Step 4: Create a Beneficiary Account — Repeat the account creation process using the endpoint to create an account for the beneficiary (receiver). At a minimum, provide the beneficiary’s name and wallet address. Use the reference_id from this request as the beneficiary_account_reference_id in the Create Transfer query.

Step 8: Ospree notifies VASP A of VASP B’s decision via a .

Step 2: When an incoming transfer is detected, Ospree’s sends a notification to VASP A.

Step 4: VASP A the transfer.

Step 4: VASP A uses the endpoint to initiates a Travel Rule transfer to the self-hosted address.

Step 6: The VASP recognizes the previously declared self-hosted wallet address and uses the endpoint to initiates a Travel Rule transfer from that address back to itself for record-keeping purposes.

Step 3: The Service Provider starts a Travel Rule using

Step 9: Ospree notifies Service Provider of VASP B’s decision via a .

Create a Originator Account— Use the endpoint to create a customer account representing the originator (sender). Include the required Travel Rule information such as name, wallet address, and residential or business address. Use the reference_id returned from this request as the originator_account_reference_id in the Create Transfer query.

Create a Beneficiary Account— Repeat the account creation process using the endpoint to create an account for the beneficiary (receiver). At a minimum, provide the beneficiary’s name and wallet address. Use the reference_id from this request as the beneficiary_account_reference_id in the Create Transfer query.

Step 6: The Service Provider starts a Travel Rule using by simply passing the reference IDs.

Step 10: Ospree notifies Service Provider of VASP B’s decision via a .

Create Transfer
Create Transfer
/api/v2/directory/accounts
/api/v2/directory/accounts
webhook
webhook
approves or reject
Create Transfer
Create Transfer
Create Transfer
webhook
/api/v2/directory/accounts
/api/v2/directory/accounts
Create Transfer
webhook
VASP-to-VASP Withdrawal
VASP-to-VASP Deposit
Self-Hosted Wallet Withdrawal
Self-Hosted Wallet Deposit
VASP-to-VASP Withdrawal
VASP-to-VASP Withdrawal