Webhooks
Webhooks deliver real-time updates for events to your system, eliminating the need to poll the API. When an event occurs, relevant data is pushed to your configured server endpoint.
Setting Up Your Webhook
To start receiving real-time updates for events to your system, follow the steps below:
Step 1: Access Your Corporate Dashboard
Navigate to your Rox Custody Corporate Dashboard using your subdomain.
Example:
https://[your-subdomain].roxcustody.com
Log in with your credentials and ensure you have access to your corporate dashboard.
Step 2: Create Your Vault
Before setting up webhooks, ensure you have created a vault within the dashboard. This is a required step, as the webhook events will correspond to activities linked to your vault.
Step 3: Verify Your Website and Token
Input Your Server's URL: Provide the URL where you want to receive webhook events.
Set Your Secret Token: Enter a token of your choice. This token will be sent in the webhook request headers under the key
rox-auth-secret
.Verify Requests on Your Server: Use the
rox-auth-secret
header to validate the authenticity of incoming webhook payloads on your backend server.
Step 4: Events Selection
After verification, choose the events you want to subscribe to, so you only receive updates for relevant actions.
Step 5: Test Your Webhook
You can trigger a test event from the webhooks events page to ensure your endpoint is correctly configured to receive and process webhook payloads.
Event Examples
We provide the following webhook events for your vault activities:
Asset Events
ADD_ASSET
: Triggered when a new asset is added.ACTIVATE_ASSET
: Triggered when your vault asset is activated.DEACTIVATE_ASSET
: Triggered when your vault asset is deactivated.
Transaction Events
CREATE_TRANSACTION
: Triggered when a transaction is initiated from RoxCustody or received from an external source.REJECTED_TRANSACTION
: Triggered when a transaction is rejected.ERROR_TRANSACTION
: Triggered when a transaction encounters an error.BLOCKCHAIN_REJECTED_TRANSACTION
: Triggered when the blockchain rejects a transaction.COMPLETED_TRANSACTION
: Triggered when a transaction is successfully completed.
Wallet Events
SYNC_VAULT_WALLETS
: Triggered when new vault wallets are created.SYNC_CLIENT_WALLETS
: Triggered when new client wallets are created.
By subscribing to these events, you can stay updated in real time about your vault's assets, transactions, and wallets.
Payload Examples
1: Asset Event
This example represents the webhook payload for an Asset Event (e.g., add_asset
):
2: Transaction Event
This example represents the webhook payload for a Transaction Event (e.g., create_transaction
):
3: Sync Client Wallets Event
This example represents the webhook payload for the sync_client_wallets
event:
Last updated