You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Learn everything about thirdweb’s web3 payments solution, Universal Bridge. Technical docs on onramping, bridging + swapping.",
14
14
});
15
15
16
-
# Overview
16
+
# Universal Bridge
17
17
18
-
Universal Bridge allows your users to bridge, swap, and purchase cryptocurrencies and execute transactions with any fiat options or tokens via cross-chain routing. It enables users to purchase or complete in-app transactions with any token they hold.
18
+
Universal Bridge allows you to create both simple and advanced payment flows for bridging, swapping, onramping, and peer-to-peer purchases. It's been used to drive millions in NFT sales, bridge native tokens to brand new chains, send stablecoins between users, and more. To get started check out the [SDK functions](https://portal.thirdweb.com/typescript/v5/buy/quote), [API reference](https://bridge.thirdweb.com/reference), or [playground](https://playground.thirdweb.com/connect/pay).
19
19
20
20
<DocImagesrc={PayOverviewImage} />
21
21
@@ -35,7 +35,7 @@ Universal Bridge allows your users to bridge, swap, and purchase cryptocurrencie
35
35
description="Bridging support in over 160+ countries to reach a truly global audience."
36
36
iconUrl={<Globe/>}
37
37
/>
38
-
<FeatureCard
38
+
<FeatureCard
39
39
title="Earn revenue"
40
40
description="Monetize your application and earn swap fees on each transaction."
41
41
iconUrl={<PiggyBank />}
@@ -80,7 +80,6 @@ Universal Bridge is supported on select EVM compatible chains. To view the full
@@ -91,4 +90,5 @@ Universal Bridge is supported on select EVM compatible chains. To view the full
91
90
|[Buy Crypto](https://playground.thirdweb.com/connect/pay/)| Developers who want onramp and crypto purchase experiences directly in their application. |
92
91
|[Transactions](https://playground.thirdweb.com/connect/pay/transactions)| Developers who want users to onramp or purchase crypto directly into a transaction. Great for minting and NFT purchase flows. |
93
92
|[In-App Purchases](https://playground.thirdweb.com/connect/pay/commerce)| Developers who want to take payments from Fiat or Crypto directly to a seller wallet |
94
-
|[Headless](https://playground.thirdweb.com/connect/pay/backend)| Developers who prefer a headless customized flow using APIs. |
93
+
|[SDK](https://portal.thirdweb.com/typescript/v5/buy/quote)| Build your own UI with the SDK. |
94
+
|[API](https://playground.thirdweb.com/connect/pay/backend)| Control the full experience with the API. |
"Learn how to set up webhooks for web3 payments with thirdweb’s Universal bridge feature: the technical docs",
7
+
"Learn how to set up webhooks for any Universal Bridge transactions.",
8
8
});
9
9
10
10
# Webhooks
11
11
12
-
Universal Bridge can be configured to send webhook events to notify your application any time an event happens on your transaction. Universal Bridge sends a response, via a HTTP request, to any endpoint URLs that you have provided us in your Team > Project > Connect > Universal Bridge > Webhooks page in [thirdweb dashboard](https://thirdweb.com/team).
12
+
You can create a webhook in your project dashboard under the Universal Bridge tab. You'll be prompted to copy a secret key before saving the webhook. This will be used for verification on all webhook requests received by your backend.
13
13
14
-
## Events
14
+
## Response Objects
15
15
16
-
To listen to events, create a webhook in your Team > Project > Connect > Pay > Webhooks page in [thirdweb dashboard](https://thirdweb.com/team). Webhook URLs must start with `https://`.
16
+
To get the TypeScript type for webhook responses, see the [`Webhook.Payload`](https://portal.thirdweb.com/typescript/v5/webhook/payload) type in the SDK.
|`purchase_complete`| A transaction is confirmed onchain. |
18
+
### Example Payloads
21
19
22
-
### Purchase Complete
23
-
24
-
Triggered when a transaction is confirmed onchain. This event provides information about the new status of the order and its transactionHash, as well as other relevant information.
Since any outside origin can call your webhook endpoint, it is recommended to verify the webhook signature to ensure a request comes from your Pay instance.
187
-
188
-
### Check the Signature
189
-
190
-
The payload body is signed with the webhook secret and provided in the X-Pay-Signature request header.
191
-
192
-
Get the webhook secret for your webhook endpoint from the dashboard.
193
-
194
-
This code example checks if the signature is valid:
0 commit comments