Brale webhooks
Brale webhooks let your application receive real-time notifications when important events happen in Brale. Instead of polling Brale APIs to check whether a transfer or payment has completed, you can register an HTTPS endpoint and Brale willPOST a signed event to your application as soon as the event occurs.
Use webhooks to:
- Update your internal ledger when a transfer completes
- Notify your users when money movement settles
- Reconcile completed transfers or payments
- Prompt customers to upload KYB documents when verification review requires them
- Trigger downstream workflows without polling
- Build real-time dashboards for operations and treasury teams
How webhooks work
At a high level:- You create a webhook subscription for your Brale account.
- Brale returns a
sharedSecretone time. - You store the
sharedSecretsecurely. - When a subscribed event occurs, Brale sends an HTTPS
POSTto your endpoint. - Your application verifies the HMAC signature using the exact raw request body.
- Your application processes the event idempotently.
- Your endpoint returns a
2xxresponse to acknowledge delivery.
Webhook subscription API
Webhook subscriptions are managed under a Brale account:Create a subscription
The
sharedSecret is returned only once when the subscription is created. Store it immediately. List and get subscription endpoints do not return the secret again.Account scope
Webhook subscriptions are account-scoped. A subscription created under/accounts/{account_id}/webhooks receives events for that Brale account.
If all of your activity runs under one Brale account, one webhook subscription can receive events for that account.
If your integration manages separate Brale accounts for separate customers, create a webhook subscription for each account whose events you want to receive. Brale does not currently provide a single org-level catch-all webhook subscription across all accounts.
For testnet and mainnet, create webhook subscriptions in the account/environment you want to receive events from. If you have separate testnet and mainnet accounts, create separate subscriptions for those accounts.
Supported events
Use the event type discovery endpoint to see currently available events:
Use
transfer.completed when your integration is tracking Brale Transfer objects and wants to know when a transfer has completed.
Wildcard subscriptions
Theevents array on create and update subscription requests accepts namespace wildcards of the form <namespace>.*. For example, subscribing to transfer.* gives you a single subscription that receives every event in the transfer family (transfer.created, transfer.completed, transfer.canceled, transfer.failed, and any future transfer.* events).
Wildcards work for every major event family — not just transfers:
transfer.*— all transfer eventspayment.*— all payment eventsaccount.*— all account events, including nested types likeaccount.verification.completed
["transfer.*", "payment.completed"]). New events added to a family in the future are automatically delivered to any matching wildcard subscription.
Example create request using a wildcard:
Requirements
Your webhook endpoint must:- Be publicly reachable over HTTPS
- Accept
POSTrequests - Accept
Content-Type: application/json - Read the raw request body before parsing JSON
- Verify the
x-request-signature-sha-256header - Return a
2xxresponse quickly - Deduplicate events by event
idand/oridempotency-key