Skip to main content

Webhook Configuration

Setting Up a Webhook

  1. Navigate to the Webhooks section in your dashboard
  2. Click "Add New Webhook"
  3. Configure the following:
    • Name (optional): Identifier for your webhook
    • URL: Your endpoint that will receive the webhook
    • Authentication (optional): Header key and value for security

Trigger Setup

After creating a webhook, set up triggers:

  1. Go to newly added webhook
  2. Click "Add Trigger"
  3. Configure:
    • Emitter address: The address that emits the event
    • Event Name: The specific event to watch. This needs to match the event name that is emitted.
    • Select your webhook

Webhook Payload

Webhooks are sent as POST requests with this structure:

{
eventWatcherId: string;
transactionId: string;
events: {
data: ProgrammaticScryptoSborValue;
emitter: {
globalEmitter: string;
methodEmitter: string;
outerEmitter: string;
};
eventName: string;
}[];
}

Example webhook request payload

  • Emitter: account_rdxabc123
  • Event: DepositEvent

Payload:

{
"transactionId": "txid_rdxxyz",
"eventWatcherId": "cb95fc54-289c-4d9b-8e96-5e0226534125",
"events": [
{
"eventName": "DepositEvent",
"emitter": {
"globalEmitter": "account_rdxabc123",
"methodEmitter": "internal_vault_rdx1tz8dqc8xjujftqus372nkcn7stx02c0rsuu0q7v9u0sl59924daywx",
"outerEmitter": "resource_rdx1t5y9jrqywckfuqwj589l9cpfmgqlc2zajm2szwhyn460mv2zyxs5j8"
},
"data": {
"fields": [
{
"value": "1",
"kind": "Decimal",
"field_name": "amount"
}
],
"kind": "Tuple",
"type_name": "DepositEvent"
}
},
{
"eventName": "DepositEvent",
"emitter": {
"globalEmitter": "account_rdxabc123",
"methodEmitter": "account_rdxabc123"
},
"data": {
"variant_id": "0",
"variant_name": "Fungible",
"fields": [
{
"value": "resource_rdx1t5y9jrqywckfuqwj589l9cpfmgqlc2zajm2szwhyn460mv2zyxs5j8",
"kind": "Reference",
"type_name": "ResourceAddress"
},
{
"value": "1",
"kind": "Decimal"
}
],
"kind": "Enum",
"type_name": "DepositEvent"
}
}
]
}

Best Practices

  • Use HTTPS endpoints
  • Add authentication headers
  • Create an event data schema using sbor-ez-mode