{
 "info": {
  "_postman_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "Node4All x402 API",
  "description": "Node4All gateway API collection — spec-compliant x402 v2 paid endpoints. 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": "x402-test (fortune)",
   "item": [
    {
     "name": "Sandbox — 402 challenge (no payment)",
     "request": {
      "method": "GET",
      "header": [],
      "url": {
       "raw": "{{base_url}}/v1/x402-test",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "v1",
        "x402-test"
       ]
      },
      "description": "x402 v2 payment challenge on Base Sepolia testnet. Expect HTTP 402 with a `PAYMENT-REQUIRED` response header containing Base64-encoded JSON (decode it to see `accepts[]` with price, payTo, asset, network)."
     },
     "response": []
    },
    {
     "name": "Sandbox — paid request (PAYMENT-SIGNATURE)",
     "request": {
      "method": "GET",
      "header": [
       {
        "key": "PAYMENT-SIGNATURE",
        "value": "{{payment_signature_b64}}",
        "type": "text"
       }
      ],
      "url": {
       "raw": "{{base_url}}/v1/x402-test",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "v1",
        "x402-test"
       ]
      },
      "description": "Submit a paid request on Sepolia. `{{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. `x402-fetch` or `@node4all/x402-agent-toolkit`). On success, the response carries a `PAYMENT-RESPONSE` header (Base64 JSON settlement receipt) plus the fortune payload."
     },
     "response": []
    },
    {
     "name": "Production — 402 challenge (no payment)",
     "request": {
      "method": "GET",
      "header": [],
      "url": {
       "raw": "{{prod_url}}/v1/x402-test",
       "host": [
        "{{prod_url}}"
       ],
       "path": [
        "v1",
        "x402-test"
       ]
      },
      "description": "x402 v2 payment challenge on Base mainnet. Same shape as sandbox; uses real USDC."
     },
     "response": []
    },
    {
     "name": "Production — paid request (PAYMENT-SIGNATURE)",
     "request": {
      "method": "GET",
      "header": [
       {
        "key": "PAYMENT-SIGNATURE",
        "value": "{{payment_signature_b64}}",
        "type": "text"
       }
      ],
      "url": {
       "raw": "{{prod_url}}/v1/x402-test",
       "host": [
        "{{prod_url}}"
       ],
       "path": [
        "v1",
        "x402-test"
       ]
      },
      "description": "Paid request on Base mainnet — costs $0.002 USDC."
     },
     "response": []
    }
   ]
  },
  {
   "name": "md2pdf",
   "item": [
    {
     "name": "Sandbox — 402 challenge (no payment)",
     "request": {
      "method": "POST",
      "header": [],
      "url": {
       "raw": "{{base_url}}/v1/md2pdf",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "v1",
        "md2pdf"
       ]
      },
      "description": "Markdown → PDF on Base Sepolia. Expect 402 with PAYMENT-REQUIRED header."
     },
     "response": []
    },
    {
     "name": "Sandbox — paid JSON body",
     "request": {
      "method": "POST",
      "header": [
       {
        "key": "Content-Type",
        "value": "application/json",
        "type": "text"
       },
       {
        "key": "PAYMENT-SIGNATURE",
        "value": "{{payment_signature_b64}}",
        "type": "text"
       }
      ],
      "body": {
       "mode": "raw",
       "raw": "{\"markdown\": \"# Hello World\\n\\nThis is **bold** text.\"}",
       "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 with a paid x402 signature. Returns 200 with PDF binary."
     },
     "response": []
    },
    {
     "name": "Sandbox — paid file upload",
     "request": {
      "method": "POST",
      "header": [
       {
        "key": "PAYMENT-SIGNATURE",
        "value": "{{payment_signature_b64}}",
        "type": "text"
       }
      ],
      "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 (≤10MB) to convert to PDF on the sandbox endpoint. Select a local markdown file before sending."
     },
     "response": []
    },
    {
     "name": "Production — paid JSON body",
     "request": {
      "method": "POST",
      "header": [
       {
        "key": "Content-Type",
        "value": "application/json",
        "type": "text"
       },
       {
        "key": "PAYMENT-SIGNATURE",
        "value": "{{payment_signature_b64}}",
        "type": "text"
       }
      ],
      "body": {
       "mode": "raw",
       "raw": "{\"markdown\": \"# Production Test\\n\\nReal USDC settlement on Base mainnet.\"}",
       "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. Costs $0.02 USDC."
     },
     "response": []
    }
   ]
  },
  {
   "name": "pdf2md",
   "item": [
    {
     "name": "Sandbox — 402 challenge (no payment)",
     "request": {
      "method": "POST",
      "header": [],
      "url": {
       "raw": "{{base_url}}/v1/pdf2md",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "v1",
        "pdf2md"
       ]
      },
      "description": "Layout-aware PDF → Markdown on Base Sepolia. Expect 402 with PAYMENT-REQUIRED header."
     },
     "response": []
    },
    {
     "name": "Sandbox — paid file upload",
     "request": {
      "method": "POST",
      "header": [
       {
        "key": "PAYMENT-SIGNATURE",
        "value": "{{payment_signature_b64}}",
        "type": "text"
       }
      ],
      "body": {
       "mode": "formdata",
       "formdata": [
        {
         "key": "file",
         "type": "file",
         "src": ""
        }
       ]
      },
      "url": {
       "raw": "{{base_url}}/v1/pdf2md",
       "host": [
        "{{base_url}}"
       ],
       "path": [
        "v1",
        "pdf2md"
       ]
      },
      "description": "Upload an `application/pdf` file (≤10MB) to extract layout-aware Markdown. Returns `text/markdown`."
     },
     "response": []
    },
    {
     "name": "Production — paid file upload",
     "request": {
      "method": "POST",
      "header": [
       {
        "key": "PAYMENT-SIGNATURE",
        "value": "{{payment_signature_b64}}",
        "type": "text"
       }
      ],
      "body": {
       "mode": "formdata",
       "formdata": [
        {
         "key": "file",
         "type": "file",
         "src": ""
        }
       ]
      },
      "url": {
       "raw": "{{prod_url}}/v1/pdf2md",
       "host": [
        "{{prod_url}}"
       ],
       "path": [
        "v1",
        "pdf2md"
       ]
      },
      "description": "Production pdf2md — $0.05 USDC on Base mainnet."
     },
     "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."
     },
     "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, pricing model, and paid endpoint list."
     },
     "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"
  }
 ]
}
