Docs

Developers

API integration flows

Sending Flow

This section helps you determine how incoming and outgoing transfers should be handled and how to implement the corresponding workflows using Ospree.

Start with the Routing Guide. Select the Outgoing Flow or Incoming Flow, begin at the root node, and follow each Yes or No path until you reach an outcome. Each outcome identifies the appropriate operational action and, where applicable, directs you to the relevant integration flow or API endpoint.

The integration flows provide practical implementation examples for common scenarios, including VASP-to-VASP transfers and transfers involving self-hosted wallets.

The routing flows and implementation examples serve as reference models that you can adapt to your business processes, technical architecture, and compliance procedures. Travel Rule thresholds, wallet-control verification requirements, information retrieval methods, and transfer controls should be configured according to the applicable jurisdiction and your organization’s internal compliance framework.

  • VASP-to-VASP Withdrawal

  • VASP-to-VASP Deposit

  • Self-Hosted Wallet Withdrawal

  • Self-Hosted Wallet Deposit

  • VASP-to-VASP Withdrawal (with intermediary)

  • VASP-to-VASP Withdrawal (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 .

  • 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 Create Transfer 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 Create Transfer request body, or

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

      • originator_account_reference_id

      • beneficiary_account_reference_id

    A withdrawal to another VASP is an Instruction: Ospree sends the Travel Rule data to VASP B over the protocol you name, to the VASP in beneficiary_vasp_id.

    reference_id is the transfer’s idempotency key. If a create request times out, send it again with the same reference_id: a fresh create returns 201, and a repeat returns the original transfer with 200 and the header Idempotent-Replayed: true, without creating a second one.

Steps 3 to 4 – How to Create Accounts

  • Step 3: Create Originator Account — Use the /api/v2/directory/accounts endpoint to create a customer account representing the originator (sender). Include the required Travel Rule information such as name and residential or business address. Link the customer’s wallet separately with the Address API, by sending the account’s reference_id as account_ref_id when you screen the 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 /api/v2/directory/accounts endpoint to create an account for the beneficiary (receiver). At a minimum, provide the beneficiary’s name plus one identifier: a customer ID, an address or a national ID (for an individual, a date and place of birth together also count). Set account_category to non-customer. Use the reference_id from this request as the beneficiary_account_reference_id in the Create Transfer query.

  • 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 8: Ospree notifies VASP A of VASP B’s decision via a webhook.

  • 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 2: When an incoming transfer is detected, Ospree’s webhook sends a notification 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 4: VASP A approves or rejects the transfer.

  • 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.

Transfer types. Ospree sets each transfer’s type from its shape. A withdrawal to another VASP, and a deposit VASP B sent through Ospree, are Instructions: the counterparty takes part. A transfer with a self-hosted leg, and a VASP-to-VASP deposit you record yourself because the other VASP did not send it through Ospree, are Records: create them with "is_record": true and no protocol. A Record is visible only to you.

Self-Hosted Wallet Withdrawal

This flow outlines the process for managing crypto asset withdrawals to self-hosted wallets controlled by VASP A’s customers. It includes steps for having the user prove control of the wallet 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 enters a wallet address, indicating that it is self-hosted.

  • Step 2: If the user has not yet proven control of the wallet address, VASP A requests a wallet-control verification link from Ospree.

  • Step 3: Ospree returns a secure, single-use link for that address.

  • Step 4: VASP A sends the link to the user.

  • Step 5: The user signs a message with the wallet’s key to prove control of the address.

  • Step 6: Ospree records Proven Control for the address and sends an ADDRESS_VERIFICATION_COMPLETED webhook. Proven Control shows that the user holds the wallet’s key; it does not prove the wallet is self-hosted.

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

JSON · Sample data



{
"amount": 4.5,
"dti": "4H95J0R2X",
"is_record": true,
"reference_id": "transfer-0232434",
"originator_address": "3M219KR5vEneNb47ewrPfWyb5jQ2DjxRP6",
"originator_address_is_self_hosted": false,
"beneficiary_address": "bc1qa5wkgaew2dkv56kfvj49j0av5nml45x9ek9hz6",
"beneficiary_address_is_self_hosted": true,
"originator_account_reference_id": "random-ref-id-108",
"beneficiary_account_reference_id": "random-ref-id-108"
}

  • Step 8: VASP A uses the Create Transfer endpoint to create a Travel Rule transfer for compliance and audit purposes. Because one leg is self-hosted, the transfer is a Record: send "is_record": true and no protocol. Nothing is sent to a counterparty, and only VASP A sees the transfer.

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 having the user prove control of the wallet, checking whether control has already been proven, 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 intend to send funds to VASP A.

  • Step 2: VASP A requests a wallet-control verification link from Ospree.

  • Step 3: Ospree returns a secure, single-use link for that address.

  • Step 4: VASP A sends the link to the user.

  • Step 5: The user signs a message with the wallet’s key to prove control of the address.

  • Step 6: Ospree records Proven Control for the address and sends an ADDRESS_VERIFICATION_COMPLETED webhook.

  • Step 7: The user sends crypto funds from the self-hosted address to VASP A.

JSON · Sample data



{
"amount": 4.5,
"dti": "4H95J0R2X",
"is_record": true,
"reference_id": "transfer-0232434",
"originator_address": "bc1qa5wkgaew2dkv56kfvj49j0av5nml45x9ek9hz6",
"originator_address_is_self_hosted": true,
"beneficiary_address": "3M219KR5vEneNb47ewrPfWyb5jQ2DjxRP6",
"beneficiary_address_is_self_hosted": false,
"originator_account_reference_id": "random-ref-id-108",
"beneficiary_account_reference_id": "random-ref-id-108"
}

  • Step 8: VASP A recognizes the address with Proven Control and uses the Create Transfer endpoint to create a Travel Rule transfer for compliance and audit purposes. The transfer is a Record: send "is_record": true and no protocol.

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 3: The Service Provider starts a Travel Rule using Create Transfer

  • 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 9: Ospree notifies Service Provider of VASP B’s decision via a webhook.

  • 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.

Create a Originator Account— Use the /api/v2/directory/accounts endpoint to create a customer account representing the originator (sender). Include the required Travel Rule information such as name and residential or business address. Link the customer’s wallet separately with the Address API, by sending the account’s reference_id as account_ref_id when you screen the 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 /api/v2/directory/accounts endpoint to create an account for the beneficiary (receiver). At a minimum, provide the beneficiary’s name plus one identifier: a customer ID, an address or a national ID (for an individual, a date and place of birth together also count). Use the reference_id from this request as the beneficiary_account_reference_id in the Create Transfer query.

  • Step 4: The user initiates a withdrawal request.

  • Step 5: VASP A initiates a withdrawal request.

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

  • 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 10: Ospree notifies Service Provider of VASP B’s decision via a webhook.

  • 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.

To create a transfer in the Dashboard, see Start a transfer.