Setting Up API Functions
First, define your API helper functions. You need your Secret API Key from the Brand API dashboard to authenticate requests.Create a Webhook
Next, register your webhook endpoint so Brand API can send real-time events to your application. In this example, the webhook listens forbrand.updated events.
Retrieve a Brand and Subscribe to Updates
After creating the webhook, fetch the brand you want to monitor. Then use the brandurn to subscribe your webhook to updates for that specific brand.
Unsubscribe from Brand Updates
If your application no longer needs updates for a specific brand, remove the subscription from your webhook. Use theremoveWebhookSubscriptions mutation with the webhook urn and the brand urn.
Best Use Cases
Subscribing to webhook updates is useful when your application needs fresh brand data without repeatedly polling the API. Common use cases include:- Updating cached brand profiles
- Refreshing company logos when they change
- Syncing company metadata with your database
- Keeping CRM records up to date
- Updating fintech merchant or company data
- Triggering backend workflows after brand updates
Recommended Integration Flow
Use this flow for a reliable webhook subscription setup:- Create a webhook endpoint in your backend.
- Register the webhook endpoint with Brand API.
- Fetch the brand you want to monitor.
- Subscribe the webhook to the brand
urn. - Process incoming webhook events asynchronously.
- Remove subscriptions when they are no longer needed.
