> For the complete documentation index, see [llms.txt](https://mogami.gitbook.io/mogami/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mogami.gitbook.io/mogami/learning/protocol-explanation-v1/get-weather-without-x-payment.md).

# Get /weather without X-PAYMENT

When calling a service without a valid payment attached (meaning there no `X-PAYMENT` header is set), the server responds with HTTP 402 error providing pricing and payment details:

```json
{
  "x402Version": 1,
  "error": "X-PAYMENT header is required",
  "accepts": [
    {
      "scheme": "exact",
      "network": "base-sepolia",
      "maxAmountRequired": "1000",
      "resource": "http://localhost:4021/weather",
      "description": "",
      "mimeType": "",
      "payTo": "0x2980bc24bBFB34DE1BBC91479Cb712ffbCE02F73",
      "maxTimeoutSeconds": 60,
      "asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
      "extra": {
        "name": "USDC",
        "version": "2"
      }
    }
  ]
}
```

This response is described here <https://github.com/coinbase/x402?tab=readme-ov-file#type-specifications> with `Payment Required Response` & `payment Requirements`. In our project, we have two objects to deal with it : `PaymentRequired` & `PaymentRequirement`.
