Skip to main content

Webhooks & Notifications

Real-time push notifications through webhooks organized into three streams. Subscribe per vault to receive events as they happen.

Webhook Streams

StreamScopeWhat It Covers
OutgoingPer vaultFull lifecycle of transactions created within the platform
BlockchainPer vaultAll blockchain transactions affecting vault addresses (outgoing + external)
IncomingPer vaultIncoming deposits with balance changes and confirmations

Setup Subscriptions

Configure webhook subscriptions per vault:

curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"webhookUrl": "https://your-app.com/webhooks/carabaas",
"streams": ["outgoing", "incoming", "blockchain"]
}' \
https://api.carabaas.com/api/v1/subscriptions/{vaultId}

Get Subscription Info

curl -H "Authorization: Bearer $TOKEN" \
https://api.carabaas.com/api/v1/subscriptions/{vaultId}

Delete Subscriptions

curl -X DELETE -H "Authorization: Bearer $TOKEN" \
https://api.carabaas.com/api/v1/subscriptions/{vaultId}

Confirmation Settings

Configure how many blockchain confirmations trigger the final confirmation event:

curl -X PUT \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"confirmations": {
"bitcoin-mainnet": 3,
"ethereum-mainnet": 12,
"polygon-mainnet": 30
}
}' \
https://api.carabaas.com/api/v1/subscriptions/{vaultId}/confirmations

Outgoing Stream

The outgoing stream tracks the full lifecycle of transactions created within the platform. Each state transition emits a notification.

Transaction Lifecycle Events

Success Flow

TypeFieldsDescription
pendingquorum, approvalsTransaction created, no quorum configured
approval-pendingquorum, approvalsWaiting for M-of-N approvals
approvedquorum, approvalsOne approval received (sent per approval)
warningreasonCodeInsufficient balance — waiting up to 72h
requestedApproved and queued for processing
initedBlockchain transaction built
master-approval-pendingWaiting for master approval (binds order to blockchain tx)
master-approvedMaster approval received
signedMPC signature completed
submittedblockchainHashBroadcast to blockchain
minedblockchainHash, balanceChangesConfirmed on-chain with balance changes

Failure Events

TypeFieldsDescription
warningreasonCodeInsufficient balance — platform retries for up to 72h
cancelledreasonCodeCancelled (e.g., insufficient balance after 72h, or declined)
failedblockchainHashTransaction failed on-chain (e.g., reverted)
rolledbackblockchainHashTransaction rolled back after submission
replacedblockchainHashTransaction replaced (e.g., RBF on Bitcoin)

Common Notification Fields

Every outgoing notification includes:

FieldDescription
streamAlways "outgoing"
typeEvent type (see tables above)
vaultIdVault the transaction belongs to
accountIdAccount within the vault
addressIdSource address
networkBlockchain network
orderIdYour unique order identifier
transactionIdPlatform transaction ID
destinationAddressRecipient blockchain address
timestampEvent timestamp (Unix ms)

Enriched Context

Notifications include full context about the account and address involved — you don't need additional API calls to identify the source:

FieldDescription
account.nameAccount name (e.g., "hot-wallets")
account.dataCustom metadata you set on the account
address.nameAddress name (e.g., "customer-12345")
address.networkAddressOn-chain address string
address.hdpathHD derivation path
address.dataCustom metadata you set on the address
address.memoMemo/tag value (for Stellar, Ripple, Cosmos)

This is especially useful for deposit attribution — match incoming funds to a customer by address.name, address.data, or address.memo directly from the webhook payload, without querying the API.

Example: Mined Notification

{
"stream": "outgoing",
"type": "mined",
"vaultId": "cai3GvhueQApTaCcUtjai9",
"network": "ethereum-sepolia",
"accountId": "eFjwUQXB8CMnrTHSgYzaL6",
"addressId": "gMP71sR5sNUnGdKFTsNzp6",
"destinationAddress": "0x3f06F88431d30067a7E87BB87957d008ADCc3bA7",
"orderId": "59850710-3998-4347-8c82-0d625bac9bbb",
"transactionId": "suoPF5JPqgo2NvMmMfR6mg",
"blockchainHash": "0x6a925762547de72487bb1cce0c95226e8e9cf24d...",
"metadata": {
"asn": "4",
"gas": "21000",
"gasUsed": "21000",
"gasPrice": "1200010",
"isContractCall": false
},
"balanceChanges": [
{
"asset": "c1",
"amount": "-14000000000000000",
"amountFormatted": {
"asset": { "name": "ETH Sepolia", "decimals": 18, "type": "native" },
"value": "-0.014"
},
"address": {
"id": "gMP71sR5sNUnGdKFTsNzp6",
"networkAddress": "0xF3fC7B157615c5eD88f87d05f24C4C8E0c8D6A42",
"network": "@eth-like",
"hdpath": "m/44/60/0/0/1",
"name": "hot-wallet:eth-like",
"data": { "purpose": "operations" }
},
"account": {
"id": "eFjwUQXB8CMnrTHSgYzaL6",
"name": "hot-wallets",
"data": {}
}
}
]
}

Example: Warning (Insufficient Balance)

{
"stream": "outgoing",
"type": "warning",
"reasonCode": "insufficient_balance",
"orderId": "77566f66-634e-4c0f-adce-2adc0bce7dd7",
"transactionId": "ooRPCgGMpeB1a13HG1Ajyj",
"network": "ethereum-sepolia",
"vaultId": "4inhhkumdUQAuvNnM77qQs",
"accountId": "43ta6eUh3qmWFZVmMCfNP1",
"addressId": "sd3hr3UQLFX5zUwPXqSk3o",
"destinationAddress": "0xe8d5a90ba593ad8fbc7d40de4dfc8b7f269f9cb2",
"timestamp": 1758633267120
}

Blockchain Stream

The blockchain stream reports all on-chain transactions affecting vault addresses — both outgoing (your transactions) and external (third-party transfers to or from your addresses). Scoped to a specific vault.

Event Types

TypeDescription
transactionA blockchain transaction affecting a vault address
mempoolTransaction detected in mempool (Bitcoin only)
confirmationConfirmation count update for a tracked transaction

Common Fields

FieldDescription
streamAlways "blockchain"
typeEvent type
vaultIdVault whose addresses are affected
networkBlockchain network
blockchainHashOn-chain transaction hash
balanceChangesArray of balance changes per address and asset
confirmationsCurrent confirmation count

Incoming Stream

The incoming stream tracks deposits to vault addresses from mempool detection through confirmations and potential rollbacks.

Event Types

TypeDescription
mempoolDeposit detected in mempool before block inclusion
confirmationDeposit confirmed with current confirmation count
rollbackPreviously seen deposit rolled back after reorg

Common Fields

FieldDescription
streamAlways "incoming"
typeIncoming event type (mempool, confirmation, rollback)
vaultIdVault receiving the deposit
accountIdAccount within the vault
addressIdReceiving address
networkBlockchain network
blockchainHashOn-chain transaction hash
transactionIdPlatform transaction ID
orderIdAuto-assigned order ID for the deposit
confirmationsCurrent confirmation count
balanceChangesArray of balance changes with formatted values
metadataNetwork-specific metadata (gas, contract call, etc.)

Example: Incoming Deposit

{
"stream": "incoming",
"type": "confirmation",
"network": "ethereum-sepolia",
"blockchainHash": "0xc2cc27bdcee3e369a05fe740da898de8b8ace653...",
"vaultId": "cai3GvhueQApTaCcUtjai9",
"transactionId": "d6ZktNHf45cVdHTufyrwU2",
"orderId": "29270015-c058-40be-9303-003502234cf8",
"accountId": "eFjwUQXB8CMnrTHSgYzaL6",
"addressId": "gMP71sR5sNUnGdKFTsNzp6",
"metadata": {
"asn": "0",
"gas": "21000",
"gasUsed": "21000",
"gasPrice": "1200015",
"isContractCall": false
},
"balanceChanges": [
{
"asset": "c1",
"amount": "49999974799685000",
"amountFormatted": {
"asset": { "name": "ETH Sepolia", "decimals": 18, "type": "native" },
"value": "0.049999974799685"
},
"address": {
"id": "gMP71sR5sNUnGdKFTsNzp6",
"networkAddress": "0xF3fC7B157615c5eD88f87d05f24C4C8E0c8D6A42",
"network": "@eth-like",
"hdpath": "m/44/60/0/0/1",
"name": "customer-12345",
"data": { "mid": "cust-12345" }
},
"account": {
"id": "eFjwUQXB8CMnrTHSgYzaL6",
"name": "deposits",
"data": {}
}
}
],
"confirmations": 1
}

Replay & List Notifications

Replay a Notification

Re-deliver a previously sent notification (useful for debugging or recovery):

curl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://acme.com/webhook/vault-updates",
"deliveryId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}' \
https://api.carabaas.com/api/v1/subscriptions/notifications/{notificationId}/replay

List Notifications

View the delivery log:

curl -H "Authorization: Bearer $TOKEN" \
https://api.carabaas.com/api/v1/subscriptions/notifications

See Also