Skip to content

Commit 9493fda

Browse files
committed
[Docs] webhook and ub docs (#7278)
CORE-0000 <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on enhancing the user experience for webhooks in the thirdweb platform by updating sidebar navigation, adding troubleshooting information, and improving documentation on configuring webhooks. ### Detailed summary - Updated sidebar in `insight` to rename "Getting Started" to "Get Started". - Added "Troubleshoot" section with `WrenchIcon` in `pay` sidebar. - Introduced troubleshooting content in `troubleshoot/page.mdx`. - Enhanced `webhooks/page.mdx` with new structure and images for configuration steps. - Revised descriptions and added a "Get started" section in `webhooks/page.mdx`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a "Troubleshoot" section in the sidebar for Universal Bridge, providing guidance for resolving payment card issues. - Introduced a troubleshooting article explaining card support errors and suggesting alternative payment methods. - **Documentation** - Enhanced the Insight Webhooks documentation with step-by-step setup instructions, visual aids, and improved metadata description. - Added a new "Get started" section to guide users through webhook creation and testing. - **Style** - Renamed the "Getting Started" sidebar link under Webhooks to "Get Started" for consistency. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 59dbae0 commit 9493fda

File tree

7 files changed

+72
-8
lines changed

7 files changed

+72
-8
lines changed

apps/portal/src/app/insight/sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const sidebar: SideBar = {
6565
icon: <WebhookIcon />,
6666
links: [
6767
{
68-
name: "Getting Started",
68+
name: "Get Started",
6969
href: `${insightSlug}/webhooks`,
7070
},
7171
{
Loading
Loading
Loading
Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
import { createMetadata } from "@doc";
1+
import { createMetadata, Steps, Step, DocImage } from "@doc";
2+
import CreateWebhook from './assets/create-webhooks.png'
3+
import CreateFilters from './assets/create-filters.png'
4+
import TestWebhook from './assets/test-webhook.png'
25

36
export const metadata = createMetadata({
47
title: "Insight Webhooks | thirdweb Infrastructure",
5-
description: "Getting started with Insight webhooks",
8+
description: "Receive real-time notifications for blockchain events",
69
image: {
710
title: "Insight",
811
icon: "insight",
@@ -13,8 +16,6 @@ export const metadata = createMetadata({
1316

1417
Webhooks allow you to receive notifications when specific blockchain events or transactions occur. This enables you to automate workflows and keep your applications in sync with on-chain activity.
1518

16-
## About Webhooks
17-
1819
### Data Delivery
1920
Webhook events are collected and delivered in batches for optimal performance and reliability. This makes webhooks ideal for:
2021
- Tracking when specific blockchain events occur
@@ -23,11 +24,57 @@ Webhook events are collected and delivered in batches for optimal performance an
2324
- Triggering downstream processes
2425

2526
### Delivery Guarantees
26-
Events are guaranteed to be delivered *at least once*.
27-
Your application should implement idempotency and deduplication logic using the unique event ID in the payload.
28-
Events may occasionally be delivered out of order.
27+
Events are guaranteed to be delivered *at least once*. Your application should implement idempotency and deduplication logic using the unique event ID in the payload. Please note, events may occasionally be delivered out of order.
2928

3029
### Performance Requirements
3130
- Your receiving endpoint must respond within 3 seconds
3231
- If your endpoint consistently fails to respond in time, the webhook will be automatically suspended
3332
- We recommend implementing a queue system if you need to perform time-consuming operations
33+
34+
## Get started
35+
36+
Webhooks can be configured in the thirdweb dashboard (recommended) by creating a project or [programmatically using the Insight API](/insight/webhooks/managing-webhooks).
37+
38+
<Steps>
39+
<Step title="Navigate to Webhooks">
40+
Creating a webhook requires a project. If you don't have a project yet, create one in the thirdweb dashboard and navigate to the Webhooks section.
41+
42+
</Step>
43+
<Step title="Create a Webhook">
44+
Select New Webhook and provide the following:
45+
- **Name**: A descriptive name for your webhook
46+
- **Endpoint URL**: The URL where you want to receive webhook notifications
47+
- **Events**: Select an event or transaction filter type:
48+
- **Event**: Triggered by specific blockchain events (e.g., token transfers, contract interactions)
49+
- **Transaction**: Triggered by transactions matching specific criteria (e.g., from/to address, value)
50+
51+
<DocImage src={CreateWebhook} alt="Create Webhook" />
52+
</Step>
53+
<Step title="Configure Filters">
54+
You can set up filters to narrow down the events or transactions that trigger the webhook.
55+
56+
For EVENTS:
57+
58+
- **Chain IDs**: Select the blockchain networks you want to monitor (e.g., Ethereum, Polygon)
59+
- **Contract Addresses**: Specify contract addresses to filter events related to specific contracts
60+
- **Event Signatures**: For event filters, you can specify event signatures to target specific events
61+
- **ABI**: For event filters, you can provide the ABI of the contract- providing the contract's address will usually automatically fetch the ABI.
62+
63+
For TRANSACTION:
64+
65+
- **Chain IDs**: Select the blockchain networks you want to monitor
66+
- **From/To Addresses**: Specify addresses to filter transactions by sender or recipient
67+
- **Function Signatures**: For transaction filters, you can specify function signatures to target specific contract interactions
68+
- **ABI**: For transaction filters, you can provide the ABI of the contract- providing the contract's address will usually automatically fetch the ABI.
69+
70+
<DocImage src={CreateFilters} alt="Create Filters"/>
71+
</Step>
72+
73+
<Step title="Test & Create Webhook">
74+
After creating the webhook, you can test it by sending a sample event. This allows you to verify that your endpoint is correctly configured to receive and process webhook notifications.
75+
76+
After successful testing, click "Create Webhook" to finalize the setup.
77+
78+
<DocImage src={TestWebhook} alt="Test Webhook" />
79+
</Step>
80+
</Steps>

apps/portal/src/app/pay/sidebar.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
TriangleRightIcon,
1212
WalletIcon,
1313
WebhookIcon,
14+
WrenchIcon,
1415
} from "lucide-react";
1516

1617
const paySlug = "/pay";
@@ -116,6 +117,11 @@ export const sidebar: SideBar = {
116117
href: `${paySlug}/webhooks`,
117118
icon: <WebhookIcon />,
118119
},
120+
{
121+
name: "Troubleshoot",
122+
href: `${paySlug}/troubleshoot`,
123+
icon: <WrenchIcon />,
124+
},
119125
{
120126
name: "FAQs",
121127
href: `${paySlug}/faqs`,
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import {Details} from "@doc";
2+
3+
# Universal Bridge Troubleshoot Articles
4+
5+
<Details summary="Your card does not support this type of purchase.">
6+
When using onramp providers, you may encounter an error stating "There was an issue processing your payment and you have not been charged. Your card does not support this type of purchase."
7+
8+
This typically means that your card issuer does not allow cryptocurrency purchases.
9+
10+
To work around this issue, you can try using a different card or payment method, such as debit card, if available.
11+
</Details>

0 commit comments

Comments
 (0)