{
	"info": {
		"_postman_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
		"name": "Node4All x402 API",
		"description": "Node4All gateway API collection. x402 v2 spec-compliant endpoints facilitated by Coinbase CDP (`/v1/coinbase/x402-test`), reached via the public alias `/v1/x402-test` (301 redirect). Network is implicit per subdomain: `sandbox.node4all.com` = Base Sepolia, `api.node4all.com` = Base Mainnet. See https://node4all.com/llms.txt and /.well-known/x402.json for machine-readable discovery.",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "Production x402 v2 (Base Mainnet, Coinbase CDP)",
			"item": [
				{
					"name": "402 Payment Challenge (no payment)",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{prod_url}}/v1/coinbase/x402-test",
							"host": [
								"{{prod_url}}"
							],
							"path": [
								"v1",
								"coinbase",
								"x402-test"
							]
						},
						"description": "x402 v2 payment challenge on Base mainnet via the Coinbase CDP facilitator. Expect HTTP 402 with a `PAYMENT-REQUIRED` response header containing Base64-encoded JSON (decode it to see the `accepts[]` array with price, payTo, asset, network)."
					},
					"response": []
				},
				{
					"name": "Public alias — 301 redirect",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{prod_url}}/v1/x402-test",
							"host": [
								"{{prod_url}}"
							],
							"path": [
								"v1",
								"x402-test"
							]
						},
						"description": "Brand-agnostic public alias. Expect HTTP 301 with `Location: /v1/coinbase/x402-test`. Postman follows redirects by default, so the final response will be the 402 challenge above."
					},
					"response": []
				},
				{
					"name": "Verify Payment (PAYMENT-SIGNATURE, illustrative only)",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "PAYMENT-SIGNATURE",
								"value": "{{payment_signature_b64}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{prod_url}}/v1/coinbase/x402-test",
							"host": [
								"{{prod_url}}"
							],
							"path": [
								"v1",
								"coinbase",
								"x402-test"
							]
						},
						"description": "Submit a paid request. `{{payment_signature_b64}}` must be Base64-encoded JSON of an EIP-3009 `transferWithAuthorization` payload matching the `accepts[]` entry from the 402 challenge. Postman cannot produce this value — use a wallet/SDK (e.g. the official x402-fetch client) to sign the authorization. On success, the response carries a `PAYMENT-RESPONSE` header (Base64 JSON settlement receipt with the settled tx hash) plus the fortune payload."
					},
					"response": []
				}
			]
		},
		{
			"name": "Sandbox x402 v2 (Base Sepolia, Coinbase CDP)",
			"item": [
				{
					"name": "402 Payment Challenge (no payment)",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/v1/coinbase/x402-test",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v1",
								"coinbase",
								"x402-test"
							]
						},
						"description": "x402 v2 payment challenge on Base Sepolia testnet via the Coinbase CDP facilitator. Expect HTTP 402 with a `PAYMENT-REQUIRED` response header containing Base64 JSON. Use testnet USDC to complete the flow."
					},
					"response": []
				},
				{
					"name": "Public alias — 301 redirect",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/v1/x402-test",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v1",
								"x402-test"
							]
						},
						"description": "Brand-agnostic public alias (sandbox). Expect HTTP 301 with `Location: /v1/coinbase/x402-test`."
					},
					"response": []
				},
				{
					"name": "Verify Payment (PAYMENT-SIGNATURE, illustrative only)",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "PAYMENT-SIGNATURE",
								"value": "{{payment_signature_b64}}",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{base_url}}/v1/coinbase/x402-test",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v1",
								"coinbase",
								"x402-test"
							]
						},
						"description": "Submit a paid request on Sepolia. Same PAYMENT-SIGNATURE structure as mainnet but for `eip155:84532` (Base Sepolia testnet USDC). Requires signing via x402-fetch or similar SDK."
					},
					"response": []
				}
			]
		},
		{
			"name": "Discovery (agent-readable metadata)",
			"item": [
				{
					"name": "/.well-known/x402.json (apex)",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{apex_url}}/.well-known/x402.json",
							"host": [
								"{{apex_url}}"
							],
							"path": [
								".well-known",
								"x402.json"
							]
						},
						"description": "Apex discovery document listing all paid endpoints across sandbox + production. No formal spec — pragmatic shape mirroring ecosystem conventions."
					},
					"response": []
				},
				{
					"name": "/.well-known/x402.json (sandbox)",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/.well-known/x402.json",
							"host": [
								"{{base_url}}"
							],
							"path": [
								".well-known",
								"x402.json"
							]
						},
						"description": "Sandbox-only discovery (Base Sepolia endpoints)."
					},
					"response": []
				},
				{
					"name": "/.well-known/x402.json (production)",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{prod_url}}/.well-known/x402.json",
							"host": [
								"{{prod_url}}"
							],
							"path": [
								".well-known",
								"x402.json"
							]
						},
						"description": "Production-only discovery (Base Mainnet endpoints)."
					},
					"response": []
				},
				{
					"name": "/llms.txt (apex)",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{apex_url}}/llms.txt",
							"host": [
								"{{apex_url}}"
							],
							"path": [
								"llms.txt"
							]
						},
						"description": "Plain-text service description optimized for LLM/agent consumption."
					},
					"response": []
				},
				{
					"name": "/.well-known/agent.json (apex)",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{apex_url}}/.well-known/agent.json",
							"host": [
								"{{apex_url}}"
							],
							"path": [
								".well-known",
								"agent.json"
							]
						},
						"description": "Agent identity card — name, description, protocols, facilitators, pricing model, and paid endpoint list."
					},
					"response": []
				}
			]
		},
		{
			"name": "Mock Endpoints (NOT x402 v2 spec-compliant)",
			"item": [
				{
					"name": "Mock x402 Challenge",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{base_url}}/v1/mock/test-x402",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v1",
								"mock",
								"test-x402"
							]
						},
						"description": "Legacy toy endpoint — returns a non-spec `Payment-Required` header for teaching purposes only. Does NOT implement x402 v2. Real agents should use `/v1/coinbase/x402-test`."
					},
					"response": []
				},
				{
					"name": "Mock x402 Success",
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Payment-Signature",
								"value": "any-mock-signature-value",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{base_url}}/v1/mock/test-x402",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v1",
								"mock",
								"test-x402"
							]
						},
						"description": "Legacy mock — accepts any string >= 10 chars as a fake signature."
					},
					"response": []
				}
			]
		},
		{
			"name": "md2pdf",
			"item": [
				{
					"name": "Sandbox — JSON Body (200)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\"markdown\": \"# Hello World\\n\\nThis is **bold** text and this is *italic* text.\\n\\n## Section Two\\n\\nA paragraph with a [link](https://example.com).\"}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/v1/md2pdf",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v1",
								"md2pdf"
							]
						},
						"description": "Convert a JSON markdown payload to PDF on the sandbox endpoint. Expected 200 with PDF binary response."
					},
					"response": []
				},
				{
					"name": "Sandbox — File Upload (200)",
					"request": {
						"method": "POST",
						"header": [],
						"body": {
							"mode": "formdata",
							"formdata": [
								{
									"key": "file",
									"type": "file",
									"src": ""
								}
							]
						},
						"url": {
							"raw": "{{base_url}}/v1/md2pdf",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v1",
								"md2pdf"
							]
						},
						"description": "Upload a .md file to convert to PDF on the sandbox endpoint. Select a local markdown file before sending. Expected 200 with PDF binary response."
					},
					"response": []
				},
				{
					"name": "Sandbox — Empty Body (400)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/v1/md2pdf",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v1",
								"md2pdf"
							]
						},
						"description": "Send an empty JSON object with no markdown field. Expected 400 validation error."
					},
					"response": []
				},
				{
					"name": "Sandbox — Oversized Payload (413)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\"markdown\": \"x\"}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base_url}}/v1/md2pdf",
							"host": [
								"{{base_url}}"
							],
							"path": [
								"v1",
								"md2pdf"
							]
						},
						"description": "Replace body with content exceeding 1MB to trigger 413. The sandbox endpoint enforces a 1MB payload limit."
					},
					"response": []
				},
				{
					"name": "Production — JSON Body (200)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\"markdown\": \"# Production Test\\n\\nThis request uses the production endpoint with a 5MB limit.\"}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{prod_url}}/v1/md2pdf",
							"host": [
								"{{prod_url}}"
							],
							"path": [
								"v1",
								"md2pdf"
							]
						},
						"description": "Convert a JSON markdown payload to PDF on the production endpoint. Expected 200 with PDF binary response."
					},
					"response": []
				},
				{
					"name": "Production — Large Payload (200)",
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\"markdown\": \"# Large Document Test\\n\\nThis payload is under 5MB so it passes on production but would fail on sandbox (1MB limit).\"}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{prod_url}}/v1/md2pdf",
							"host": [
								"{{prod_url}}"
							],
							"path": [
								"v1",
								"md2pdf"
							]
						},
						"description": "Send a payload between 1MB and 5MB to verify the production limit. Passes here, would 413 on sandbox."
					},
					"response": []
				}
			]
		}
	],
	"variable": [
		{
			"key": "apex_url",
			"value": "https://node4all.com",
			"type": "default"
		},
		{
			"key": "base_url",
			"value": "https://sandbox.node4all.com",
			"type": "default"
		},
		{
			"key": "prod_url",
			"value": "https://api.node4all.com",
			"type": "default"
		},
		{
			"key": "payment_signature_b64",
			"value": "PASTE_BASE64_ENCODED_EIP3009_PAYLOAD_HERE",
			"type": "default"
		}
	]
}
