Developers / Webhooks
Webhook Events
Webhook events
Webhook events represent specific actions or status changes within Ospree that trigger real-time notifications to your subscribed endpoint. Each event contains structured data, enabling your system to process and respond automatically. This section provides an overview of the available webhook events and their triggers.
Event family (event_type)
Event Name
Trigger
TRAVEL_RULE
INCOMING_TRANSFER
Triggered when a new incoming transfer request is received from a counterparty, requiring review and action.
TRAVEL_RULE
TRANSFER_ACCEPTED
Triggered when an outgoing transfer request has been “accepted” by the recipient and is ready for processing.
TRAVEL_RULE
TRANSFER_REJECTED
Triggered when an outgoing transfer request is “rejected” by the counterparty, preventing it from proceeding.
TRAVEL_RULE
TRANSFER_COMPLETED
Triggered when an incoming transfer has been successfully “completed”.
TRAVEL_RULE
TRANSFER_CANCELED
Triggered when a transfer has been “canceled” by the other party.
TRAVEL_RULE
TRANSFER_FAILED
Triggered when an outgoing transfer could not be delivered to the counterparty VASP.
TRAVEL_RULE
TRANSFER_TIMED_OUT
Triggered when an outgoing transfer was not answered before its response deadline (response_timeout).
ADDRESS_VERIFICATION
ADDRESS_VERIFICATION_COMPLETED
Triggered when the wallet holder has proved control of the address by signature.
ADDRESS_VERIFICATION
ADDRESS_VERIFICATION_FAILED
Triggered when a wallet-control verification has failed.
COMPLIANCE
RULE_BREACHED
Triggered when a transaction breached one of your compliance rules. See Rule Engine.
Subscribing to events
When you configure a webhook endpoint, send the event family as an integer event_type:
event_type
Event family
1
TRAVEL_RULE
3
ADDRESS_VERIFICATION
4
COMPLIANCE
List the events you want in event_names. Every name must belong to that family, or the request is refused. Leave event_names empty to receive every event in the family.
Who receives an event
On an instruction, Ospree notifies the other party, not the business that took the action. A cancel notifies both parties except the one that canceled. On a record, Ospree notifies the business that created the record, so you receive webhooks for actions on your own records.
Webhook request schema
Every webhook request has the same envelope. Below is the description of each field.
Field
Type
Description
request_id
UUID
Unique for one delivery to one endpoint, and repeated on every retry of that delivery. Use it as your idempotency key. Do not assume a particular UUID version.
event_type
string
The event family the event belongs to (e.g. “TRAVEL_RULE”).
event_name
string
The specific event that triggered the webhook. See the list of events here.
timestamp
datetime
The date and time the webhook request was built, in UTC, in ISO-8601 format with no offset. Example: 2025-11-13T07:50:45.854720
error
object or null
{code, message, retry}. Set on TRANSFER_REJECTED, TRANSFER_FAILED, TRANSFER_TIMED_OUT and ADDRESS_VERIFICATION_FAILED; null otherwise. retry is always false. See Transfer Errors for the travel rule codes.
data
object
The event data. Its shape depends on the event family (see below).
Travel Rule data schema
Name
Type
Description
transfer_id
UUID
Unique identifier for the transfer.
reference_id
string or null
Identifier for the transfer, defined by the sender.
Example: transfer20250312040414
amount
number
The amount of the digital token being transferred.
amount_usd
number or null
The value of the digital token being transferred in USD.
dti
string or null
The unique DTI reference of the digital token.
Refer to Token Identifier for the list of supported DTIs.
Example: 4H95J0R2X
chain
string or null
The chain name as shown to your business: the canonical chain name, or your own alias for it if you set one.
Example: bitcoin
symbol
string or null
The symbol of the digital token.
Refer to Token Identifier for the list of supported token symbols.
Example: BTC
protocol
string or null
Travel Rule protocol used for the information exchange. One of:
• “flow”
• “trp”
• “cryptoswift”
• “trisa”null on a RECORD, which uses no protocol.
transaction_hash
string or null
Blockchain transaction hash. Set once the transfer is completed.
originator_address_is_self_hosted
boolean
Whether the originator wallet was declared self-hosted. Always false on an INSTRUCTION.
beneficiary_address_is_self_hosted
boolean
Whether the beneficiary wallet was declared self-hosted. Always false on an INSTRUCTION.
response_deadline
datetime or null
The response deadline that passed, in ISO-8601 format with a UTC offset. Set only on TRANSFER_TIMED_OUT; null otherwise.
reject_message
string or null
The counterparty’s rejection message. Set only on a REJECTED transfer.
Address Verification data schema
The ADDRESS_VERIFICATION_COMPLETED event carries the address below. It is sent when the wallet holder completes a wallet-control verification.
Name
Type
Description
address
string
Unique blockchain identifier.
Example: 1JjYpRXfPntVEJqAjxsYmvFjjJBdJyaJ2k
chain
string
Blockchain network name, as shown to your business.
Example: bitcoin
is_validated
boolean
Indicates whether the address exists and has a transaction history.
is_self_hosted
boolean
Shows if the address is declared self-hosted. Always true on this event.
is_verified
boolean
Proven control: the holder proved control of the address’s key by signing a message. Always true on this event.
is_customer
boolean or null
Flags whether the address is linked to a known customer account. null when no linked account is found.
reference_id
string or null
Reference ID of the linked account. null when no linked account is found.
The ADDRESS_VERIFICATION_FAILED event carries data with a message and the HTTP status of the failed attempt, and a populated error. Branch on error.code, not on the message, which may change:
Code
Meaning
INVALID_LINK
The verification link cannot be used. The holder needs a new link.
LINK_EXPIRED
The verification link has expired.
ALREADY_VERIFIED
Control of this address was already proven.
SIGNATURE_INVALID
The signature did not match the address.
VERIFICATION_ERROR
Any other failure, for example a chain that cannot be verified.
Webhook request examples
Travel Rule
Below are example requests for the different travel rule events.
INCOMING_TRANSFER
JavaScript · Sample data
// Received when there is an incoming transfer from a counterparty VASP.{ "request_id": "5d6c3b0e-2f1a-5b7c-9d3e-4f5a6b7c8d9e", "event_type": "TRAVEL_RULE", "event_name": "INCOMING_TRANSFER", "timestamp": "2025-11-13T07:50:45.854720", "error": null, "data": { "transfer_id": "018f85d7-0650-7205-a1d5-011e9587c07c", "reference_id": "reference-transfer-01", "amount": 1.00, "amount_usd": 101234.00, "dti": "4H95J0R2X", "chain": "bitcoin", "symbol": "BTC", "protocol": "flow", "transaction_hash": null, "transfer_status": "REVIEW", "transfer_type": "INSTRUCTION", "originator_address_is_self_hosted": false, "beneficiary_address_is_self_hosted": false, "response_deadline": null, "reject_error": null, "reject_message": null }}
TRANSFER_ACCEPTED
JavaScript · Sample data
// Received when the counterparty accepts the transfer request.{ "request_id": "5d6c3b0e-2f1a-5b7c-9d3e-4f5a6b7c8d9e", "event_type": "TRAVEL_RULE", "event_name": "TRANSFER_ACCEPTED", "timestamp": "2025-11-13T07:50:45.854720", "error": null, "data": { "transfer_id": "018f85d7-0650-7205-a1d5-011e9587c07c", "reference_id": "reference-transfer-01", "amount": 1.00, "amount_usd": 101234.00, "dti": "4H95J0R2X", "chain": "bitcoin", "symbol": "BTC", "protocol": "flow", "transaction_hash": null, "transfer_status": "ACCEPTED", "transfer_type": "INSTRUCTION", "originator_address_is_self_hosted": false, "beneficiary_address_is_self_hosted": false, "response_deadline": null, "reject_error": null, "reject_message": null }}
TRANSFER_REJECTED
JavaScript · Sample data
// Received when the counterparty rejects the transfer request.// A rejection is final.{ "request_id": "5d6c3b0e-2f1a-5b7c-9d3e-4f5a6b7c8d9e", "event_type": "TRAVEL_RULE", "event_name": "TRANSFER_REJECTED", "timestamp": "2025-11-13T07:50:45.854720", "error": { "code": "HIGH_RISK", "message": "Beneficiary is outside our risk appetite", "retry": false }, "data": { "transfer_id": "018f85d7-0650-7205-a1d5-011e9587c07c", "reference_id": "reference-transfer-01", "amount": 1.00, "amount_usd": 101234.00, "dti": "4H95J0R2X", "chain": "bitcoin", "symbol": "BTC", "protocol": "flow", "transaction_hash": null, "transfer_status": "REJECTED", "transfer_type": "INSTRUCTION", "originator_address_is_self_hosted": false, "beneficiary_address_is_self_hosted": false, "response_deadline": null, "reject_error": "HIGH_RISK", "reject_message": "Beneficiary is outside our risk appetite" }}
TRANSFER_COMPLETED
JavaScript · Sample data
// Received when the counterparty marks the transaction as "complete"// and provides the transaction hash.{ "request_id": "5d6c3b0e-2f1a-5b7c-9d3e-4f5a6b7c8d9e", "event_type": "TRAVEL_RULE", "event_name": "TRANSFER_COMPLETED", "timestamp": "2025-11-13T07:50:45.854720", "error": null, "data": { "transfer_id": "018f85d7-0650-7205-a1d5-011e9587c07c", "reference_id": "reference-transfer-01", "amount": 1.00, "amount_usd": 101234.00, "dti": "4H95J0R2X", "chain": "bitcoin", "symbol": "BTC", "protocol": "flow", "transaction_hash": "b713dc87e18a771383a287344a82499d572cead39bdb025691404be441378c27", "transfer_status": "COMPLETED", "transfer_type": "INSTRUCTION", "originator_address_is_self_hosted": false, "beneficiary_address_is_self_hosted": false, "response_deadline": null, "reject_error": null, "reject_message": null }}
TRANSFER_CANCELED
JavaScript · Sample data
// Received when the other party cancels the transfer. On Flow this can// happen before an answer; on TRP, TRISA and CryptoSwift only after acceptance.{ "request_id": "5d6c3b0e-2f1a-5b7c-9d3e-4f5a6b7c8d9e", "event_type": "TRAVEL_RULE", "event_name": "TRANSFER_CANCELED", "timestamp": "2025-11-13T07:50:45.854720", "error": null, "data": { "transfer_id": "018f85d7-0650-7205-a1d5-011e9587c07c", "reference_id": "reference-transfer-01", "amount": 1.00, "amount_usd": 101234.00, "dti": "4H95J0R2X", "chain": "bitcoin", "symbol": "BTC", "protocol": "flow", "transaction_hash": null, "transfer_status": "CANCELED", "transfer_type": "INSTRUCTION", "originator_address_is_self_hosted": false, "beneficiary_address_is_self_hosted": false, "response_deadline": null, "reject_error": null, "reject_message": null }}
TRANSFER_FAILED
JavaScript · Sample data
// Received when an outgoing transfer could not be delivered to the// counterparty VASP. Not final: a late answer from the counterparty replaces it.{ "request_id": "5d6c3b0e-2f1a-5b7c-9d3e-4f5a6b7c8d9e", "event_type": "TRAVEL_RULE", "event_name": "TRANSFER_FAILED", "timestamp": "2025-11-13T07:50:45.854720", "error": { "code": "INQUIRY_DISPATCH_FAILED", "message": "Transfer Inquiry could not be delivered to the Counterparty VASP", "retry": false }, "data": { "transfer_id": "018f85d7-0650-7205-a1d5-011e9587c07c", "reference_id": "reference-transfer-01", "amount": 1.00, "amount_usd": 101234.00, "dti": "4H95J0R2X", "chain": "bitcoin", "symbol": "BTC", "protocol": "trp", "transaction_hash": null, "transfer_status": "FAILED", "transfer_type": "INSTRUCTION", "originator_address_is_self_hosted": false, "beneficiary_address_is_self_hosted": false, "response_deadline": null, "reject_error": null, "reject_message": null }}
TRANSFER_TIMED_OUT
JavaScript · Sample data
// Received when an outgoing transfer was not answered before its// response deadline. Not final: a late answer from the counterparty replaces it.{ "request_id": "5d6c3b0e-2f1a-5b7c-9d3e-4f5a6b7c8d9e", "event_type": "TRAVEL_RULE", "event_name": "TRANSFER_TIMED_OUT", "timestamp": "2025-11-13T07:50:45.854720", "error": { "code": "COUNTERPARTY_RESPONSE_TIMEOUT", "message": "The Counterparty VASP did not answer the Transfer Inquiry before the response deadline", "retry": false }, "data": { "transfer_id": "018f85d7-0650-7205-a1d5-011e9587c07c", "reference_id": "reference-transfer-01", "amount": 1.00, "amount_usd": 101234.00, "dti": "4H95J0R2X", "chain": "bitcoin", "symbol": "BTC", "protocol": "trp", "transaction_hash": null, "transfer_status": "TIMED_OUT", "transfer_type": "INSTRUCTION", "originator_address_is_self_hosted": false, "beneficiary_address_is_self_hosted": false, "response_deadline": "2025-11-13T07:50:00+00:00", "reject_error": null, "reject_message": null }}
Address Verification
Below are example requests for the different address verification events.
ADDRESS_VERIFICATION_COMPLETED
JSON · Sample data
{ "request_id": "0a4f3e2d-1c5b-5a69-8e7f-6d5c4b3a2f10", "event_type": "ADDRESS_VERIFICATION", "event_name": "ADDRESS_VERIFICATION_COMPLETED", "timestamp": "2025-11-13T07:50:45.854720", "error": null, "data": { "address": "0xe0e643722e83bc56c73937cfae22ce369a80fa4a", "chain": "ethereum", "is_validated": false, "is_self_hosted": true, "is_verified": true, "is_customer": null, "reference_id": null }}
ADDRESS_VERIFICATION_FAILED
JSON · Sample data
{ "request_id": "0a4f3e2d-1c5b-5a69-8e7f-6d5c4b3a2f10", "event_type": "ADDRESS_VERIFICATION", "event_name": "ADDRESS_VERIFICATION_FAILED", "timestamp": "2025-11-13T07:50:45.854720", "error": { "code": "SIGNATURE_INVALID", "message": "Signature is invalid.", "retry": false }, "data": { "message": "Signature is invalid.", "status": 400 }}