Skip to content

Commit f6f138c

Browse files
[Portal] Move x402 from payments to top-level section (#8386)
1 parent f5d5e73 commit f6f138c

File tree

23 files changed

+202
-71
lines changed

23 files changed

+202
-71
lines changed

apps/portal/redirects.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,14 @@ const paymentRedirects = {
742742
"/payments/swap": "/bridge/swap",
743743
"/payments/tokens": "/bridge/tokens",
744744
"/payments/routes": "/bridge/routes",
745+
"/payments/x402": "/x402",
746+
"/payments/x402/:path*": "/x402/:path*",
747+
"/payments/fund": "/bridge/fund",
748+
"/payments/products": "/bridge/products",
749+
"/payments/transactions": "/bridge/transactions",
750+
"/payments/send": "/bridge/send",
751+
"/payments/webhooks": "/bridge/webhooks",
752+
"/payments/custom-data": "/bridge/custom-data",
745753
};
746754

747755
const contractRedirects = {

apps/portal/src/app/Header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ const links = [
4040
name: "Contracts",
4141
},
4242
{
43-
href: "/payments",
44-
name: "Payments",
43+
href: "/x402",
44+
name: "x402",
4545
},
4646
{
4747
href: "/bridge",

apps/portal/src/app/payments/custom-data/page.mdx renamed to apps/portal/src/app/bridge/custom-data/page.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ Any purchase data you provide to a payment will be included on all webhooks, sta
188188

189189
To connect with other auth strategies, use external wallets, or sponsor gas for users, check out the following guides:
190190

191-
- [Send a Payment](/payments/send)
192-
- [Webhooks](/payments/webhooks)
191+
- [Send a Payment](/bridge/send)
192+
- [Webhooks](/bridge/webhooks)
193193

194194
## Explore Full API References
195195

apps/portal/src/app/payments/fund/page.mdx renamed to apps/portal/src/app/bridge/fund/page.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ The BuyWidget handles the complete payment flow, supporting both crypto and fiat
7474

7575
## Going Further
7676

77-
- [Custom Payment Data](/payments/custom-data) - Attach metadata to payments
78-
- [Webhooks](/payments/webhooks) - Get notified when payments complete
77+
- [Custom Payment Data](/bridge/custom-data) - Attach metadata to payments
78+
- [Webhooks](/bridge/webhooks) - Get notified when payments complete
7979

8080
## API Reference
8181

apps/portal/src/app/bridge/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const preparedQuote = await Bridge.Buy.prepare({
9797

9898
The prepared quote will contain details about the payment, including the transactions needed to execute it.
9999

100-
You can execute the included transactions using the wallet of your choice. To learn how to send it using thirdweb Wallets, checkout the [Send a Payment](/payments/send) guide.
100+
You can execute the included transactions using the wallet of your choice. To learn how to send it using thirdweb Wallets, checkout the [Send a Payment](/bridge/send) guide.
101101

102102
</TabsContent>
103103

apps/portal/src/app/payments/products/page.mdx renamed to apps/portal/src/app/bridge/products/page.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ The CheckoutWidget handles the complete payment flow, supporting both crypto and
7777

7878
## Going Further
7979

80-
- [Custom Payment Data](/payments/custom-data) - Attach metadata to payments
81-
- [Webhooks](/payments/webhooks) - Get notified when payments complete
80+
- [Custom Payment Data](/bridge/custom-data) - Attach metadata to payments
81+
- [Webhooks](/bridge/webhooks) - Get notified when payments complete
8282

8383
## API Reference
8484

apps/portal/src/app/bridge/sell/page.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ client,
5252
});
5353
```
5454

55-
You can execute this quote exactly like a buy. See the [Send a Payment](/payments/send) guide for more details on this process.
55+
You can execute this quote exactly like a buy. See the [Send a Payment](/bridge/send) guide for more details on this process.
5656

5757

5858
## Going further
5959

6060
To connect with other auth strategies, use external wallets, or sponsor gas for users, check out the following guides:
6161

62-
- [Send a Payment](/payments/send)
62+
- [Send a Payment](/bridge/send)
6363

6464
## Explore Full API References
6565

apps/portal/src/app/payments/send/page.mdx renamed to apps/portal/src/app/bridge/send/page.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ Once this code completes, your payment has been fully executed. Payments normall
262262

263263
## Going further
264264

265-
- [Sell a Product](/payments/products)
266-
- [Token Prices](/payments/tokens)
265+
- [Sell a Product](/bridge/products)
266+
- [Token Prices](/bridge/tokens)
267267

268268
## Explore API References
269269

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

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,45 @@ export const sidebar: SideBar = {
1616
{
1717
isCollapsible: false,
1818
links: [
19-
{
20-
href: `${bridgeSlug}/sell`,
21-
name: "Sell Tokens",
22-
},
2319
{
2420
href: `${bridgeSlug}/swap`,
2521
name: "Swap Tokens",
2622
},
23+
{
24+
href: `${bridgeSlug}/bridge-widget-script`,
25+
name: "BridgeWidget Script",
26+
},
27+
{
28+
href: `${bridgeSlug}/fund`,
29+
name: "Fund Wallets",
30+
},
31+
{
32+
href: `${bridgeSlug}/products`,
33+
name: "Sell a Product",
34+
},
35+
{
36+
href: `${bridgeSlug}/transactions`,
37+
name: "Pay for Transactions",
38+
},
39+
{
40+
href: `${bridgeSlug}/send`,
41+
name: "Send a Payment",
42+
},
43+
{
44+
href: `${bridgeSlug}/sell`,
45+
name: "Sell Tokens",
46+
},
2747
{
2848
href: `${bridgeSlug}/tokens`,
2949
name: "Get Token Prices",
3050
},
3151
{
32-
href: `${bridgeSlug}/bridge-widget-script`,
33-
name: "BridgeWidget Script",
52+
href: `${bridgeSlug}/webhooks`,
53+
name: "Webhooks",
54+
},
55+
{
56+
href: `${bridgeSlug}/custom-data`,
57+
name: "Custom Data",
3458
},
3559
],
3660
name: "Guides",

apps/portal/src/app/bridge/swap/page.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,9 @@ async function swapEthToMatic(amount: string, userAccount: Account) {
317317

318318
## Going Further
319319

320-
- [Send a Payment](/payments/send) - Learn about peer-to-peer transfers
320+
- [Send a Payment](/bridge/send) - Learn about peer-to-peer transfers
321321
- [Token Prices](/bridge/tokens) - Access real-time token pricing
322-
- [Webhooks](/payments/webhooks) - Get notified when swaps complete
322+
- [Webhooks](/bridge/webhooks) - Get notified when swaps complete
323323

324324
## API Reference
325325

0 commit comments

Comments
 (0)