Skip to content

Commit ffefa38

Browse files
committed
updated docs w/ paywall info
1 parent bbfe0d0 commit ffefa38

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

docs/getting-started/create-your-first-url.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,47 @@ Let's create a monetized URL using the Bitcoin whitepaper as an example:
2222
5. Select GET as the HTTP method (for files, this is typically always GET).
2323
6. Click "Add URL" (or "Upload File" if applicable).
2424

25-
After submitting, you'll receive a shortened URL similar to `https://proxy402.com/cizbtYMSzJ`. This is your monetized link. Whenever someone accesses this URL, they'll need to pay 0.01 USDC on the Base Sepolia testnet. After payment, Proxy402 makes a GET request to the original Bitcoin whitepaper URL and returns the content to the user.
25+
After submitting, you'll receive a shortened URL similar to `https://proxy402.com/BbcYpYMy6p`. This is your monetized link. Whenever someone accesses this URL, they'll need to pay 0.00001 USDC on the Base Sepolia testnet. After payment, Proxy402 makes a GET request to the original Bitcoin whitepaper URL and returns the content to the user.
2626

2727
If you set up a credit-based link, the first payment grants access and provides a way to use the remaining credits for future access (covered in the 'Accessing Monetized Content' guide).
2828

2929
## Understanding the X402 Protocol Response
3030

31-
Open a monetized URL in your browser to see the X402 protocol response. [Click here to view an example](https://proxy402.com/cizbtYMSzJ) of the Bitcoin whitepaper with a 0.01 USDC price tag.
31+
Open a monetized URL in your browser to see a nice paywall page for your content. [Click here to view an example](https://proxy402.com/BbcYpYMy6p) of the Bitcoin whitepaper with a 0.00001 USDC price tag.
3232

33-
The response will look like this:
33+
The browser will display a user-friendly payment page that looks like this:
3434

3535
![X402 Protocol Response in Browser](/img/x402-response-browser.png)
3636

37-
This response contains all the payment details that an X402-compatible client needs to pay for access, including:
38-
- The payment amount (0.01 USDC)
37+
If you want to see the raw X402 protocol JSON response (useful for developers), you can use `curl` with the `@` symbol:
38+
39+
```bash
40+
curl https://proxy402.com/BbcYpYMy6p | jq
41+
{
42+
"accepts": [
43+
{
44+
"scheme": "exact",
45+
"network": "base",
46+
"maxAmountRequired": "10",
47+
"resource": "https://proxy402.com/BbcYpYMy6p",
48+
"description": "Payment for GET https://proxy402.com/BbcYpYMy6p",
49+
"mimeType": "",
50+
"payTo": "0xddb24Bd8A6Cb0f2d3eaBF7a828C0b4364668B963",
51+
"maxTimeoutSeconds": 60,
52+
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
53+
"extra": {
54+
"name": "USD Coin",
55+
"version": "2"
56+
}
57+
}
58+
],
59+
"error": "X-PAYMENT header is required",
60+
"x402Version": 1
61+
}
62+
```
63+
64+
This will show you the exact JSON response containing all the payment details that an X402-compatible client needs to pay for access, including:
65+
- The payment amount (0.00001 USDC)
3966
- The payment destination (a Base address)
4067
- Other technical details for the X402 protocol
4168

0 commit comments

Comments
 (0)