Skip to content

Commit 50512ac

Browse files
committed
updates for adam feedback
1 parent cfcc76e commit 50512ac

File tree

4 files changed

+16
-25
lines changed

4 files changed

+16
-25
lines changed

docs/pos/payments/x402/overview.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,13 @@ Polygon currently supports x402 on Mainnet and Amoy through the following facili
1919

2020
1. [x402.rs Facilitator Endpoint](https://facilitator.x402.rs/)
2121
2. [ThirdWeb](https://playground.thirdweb.com/payments/x402)
22-
3. Polygon Self-Hosted Facilitator (Contact for access)
22+
3. Polygon Testnet Facilitator: https://x402.polygon.technology
2323

24-
The following guides will show how to use x402 on Polygon. The x402 community also has
24+
Please note: For mainnet access through Polygon's Facilitator,
25+
reach out for [access here.](https://t.me/PolygonHQ/32)
26+
27+
The following guides will show how to use x402 on Polygon.
28+
The x402 community also has
2529
created [multiple examples](https://github.com/coinbase/x402/tree/main/examples/typescript)
26-
which can be easily adapted.
30+
which can be easily adapted for Polygon.
2731

docs/pos/payments/x402/quickstart-buyers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ npm install x402-axios
2424
# or
2525
npm install x402-fetch
2626
```
27+
";
2728

2829
## 2. Create a Wallet Client
2930

@@ -63,16 +64,15 @@ console.log("Using wallet address:", account.address);
6364
You can use either `x402-fetch` or `x402-axios` to automatically handle 402 Payment Required responses and complete payment flows.
6465

6566
!!! info x402-fetch
66-
**x402-fetch** extends the native `fetch` API to handle 402 responses and payment headers for you. [Full example here](https://github.com/AkshatGada/x402_Polygon/blob/feature/facilitator-amoy/demo/quickstart-local/buyer_x402.js)
67+
**x402-fetch** extends the native `fetch` API to handle 402 responses and payment headers for you. [Full example here](https://github.com/AkshatGada/x402_Polygon/tree/feature/facilitator-amoy/demo/quickstart-local)
6768

6869
```typescript
6970
import { wrapFetchWithPayment, decodeXPaymentResponse } from "x402-fetch";
7071
// other imports...
7172

7273
// wallet creation logic...
7374

74-
const FACILITATOR_URL = process.env.FACILITATOR_URL || "https://facilitator.x402.rs";
75-
75+
const FACILITATOR_URL = process.env.FACILITATOR_URL || "https://x402.polygon.technology"
7676
const fetchWithPayment = wrapFetchWithPayment(fetch, client);
7777

7878
const url = process.env.QUICKSTART_RESOURCE_URL || 'http://127.0.0.1:4021/weather';

docs/pos/payments/x402/quickstart-sellers.md

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Install the [x402 Express middleware package](https://www.npmjs.com/package/x402
2626

2727
```bash
2828
npm install x402-express
29-
npm install @coinbase/x402 # for the mainnet facilitator
3029
```
3130

3231
Install the [x402 Next.js middleware package](https://www.npmjs.com/package/x402-next).
@@ -39,37 +38,25 @@ npm install x402-next
3938
npm install x402-hono
4039
```
4140

42-
This [community package](https://github.com/ethanniser/x402-mcp) showcases how you can use MCP (Model Context Protocol) with x402. We're working on enshrining an official MCP spec in x402 soon.
43-
44-
```bash
45-
npm install x402-mcp
46-
```
47-
48-
Full example in the repo [here](https://github.com/ethanniser/x402-mcp/tree/main/apps/example).
49-
50-
5141
### 2. Add Payment Middleware
5242

5343
Integrate the payment middleware into your application. You will need
5444
to provide:
5545

5646
* The Facilitator URL or facilitator object. For testing,
5747
use `https://facilitator.x402.rs/` which works on Polygon Mainnet and Amoy.
58-
* For more information on running in production on mainnet, check
59-
out [CDP's Quickstart for Sellers](https://docs.cdp.coinbase.com/x402/docs/
60-
quickstart-sellers). For a facilitator access on Polygon, please contact us [here.](https://t.me/PolygonHQ/32)
48+
* For a facilitator access on Polygon, please contact us [here.](https://t.me/PolygonHQ/32)
6149
* The routes you want to protect.
6250
* Your receiving wallet address.
6351

6452

65-
Full example in the repo [here](https://github.com/coinbase/x402/tree/main/examples/typescript/servers/express).
66-
Please adapt for Polygon.
53+
Full example in the repo [here](https://github.com/AkshatGada/x402_Polygon/tree/feature/facilitator-amoy/demo/quickstart-local).
54+
6755

6856

6957
```javascript
7058
import express from "express";
7159
import { paymentMiddleware } from "x402-express";
72-
// import { facilitator } from "@coinbase/x402"; // For mainnet
7360

7461
const app = express();
7562

@@ -119,7 +106,7 @@ app.listen(4021, () => {
119106
});
120107
```
121108

122-
Full example in the repo [here](https://github.com/AkshatGada/x402_Polygon/blob/feature/facilitator-amoy/demo/quickstart-local/seller_x402.js).
109+
Full example in the repo [here](https://github.com/AkshatGada/x402_Polygon/tree/feature/facilitator-amoy/demo/quickstart-local).
123110
Since this is a fullstack example, we recommend using the example to build
124111
this yourself, and treat the code snippet below as a reference to adapt for
125112
Polygon.
@@ -152,7 +139,7 @@ export const config = {
152139
};
153140
```
154141

155-
Full example in the repo [here](https://github.com/coinbase/x402/tree/main/examples/typescript/servers/express).
142+
156143

157144
```javascript
158145
import { Hono } from "hono";

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ nav:
6666
- Onramps:
6767
- Stripe: pos/payments/onramps/onramps-stripe.md
6868
- Transfers:
69-
- USDC: pos/transfers/transfer-usdc.md
69+
- USDC: pos/payments/transfers/transfer-usdc.md
7070
- x402:
7171
- Overview: pos/payments/x402/overview.md
7272
- Quickstart for Buyers: pos/payments/x402/quickstart-buyers.md

0 commit comments

Comments
 (0)