# x402_request

Request any HTTPS service without automatically paying. Returns the response if free, or a BSV payment quote for approval. POST/PUT/PATCH/DELETE may execute if the service does not require payment. Use auth=brc31 for BSV-authenticated/BRC-105 services. No API key required by the client; optional service credentials are scoped by X402_SERVICE_HEADERS. Supports BRC-105, bound BRC-120 with OP_TRUE nonces, and compact bsv-tx-v1 challenges.

## Result

The service response or a payment quote, including its ID and expiry. Also returns structured content.

## Permissions

Never automatically pays. The requested HTTP method may still change the service's state if no payment is required.

## Definition 1 (full)

Registered in: Before wallet setup; Legacy local wallet; Legacy local identity; Local Vault · broadcasting disabled; Local Vault · all roles; Local Vault · payment role only; Project · payments scope; External BRC-100 wallet; Local Vault + sponsor; Droplit wallet.

Request any HTTPS service without automatically paying. Returns the response if free, or a BSV payment quote for approval. POST/PUT/PATCH/DELETE may execute if the service does not require payment. Use auth=brc31 for BSV-authenticated/BRC-105 services. No API key required by the client; optional service credentials are scoped by X402_SERVICE_HEADERS. Supports BRC-105, bound BRC-120 with OP_TRUE nonces, and compact bsv-tx-v1 challenges.

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| url | string | Yes |  | format: "uri" |
| method | "GET" \| "POST" \| "PUT" \| "PATCH" \| "DELETE" \| "HEAD" | No |  | default: "GET" |
| body | string | No |  | maxLength: 1398104 |
| bodyEncoding | "utf8" \| "base64" | No |  | default: "utf8" |
| headers | object | No |  |  |
| auth | "none" \| "brc31" | No |  | default: "none" |
| boundHeaders | array of string | No | BRC-120 header names bound by the service; defaults to supplied request headers |  |

Nested requirements apply when their parent is supplied.

### Input schema

```json
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "format": "uri"
    },
    "method": {
      "default": "GET",
      "type": "string",
      "enum": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE",
        "HEAD"
      ]
    },
    "body": {
      "type": "string",
      "maxLength": 1398104
    },
    "bodyEncoding": {
      "default": "utf8",
      "type": "string",
      "enum": [
        "utf8",
        "base64"
      ]
    },
    "headers": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "string"
      }
    },
    "auth": {
      "default": "none",
      "type": "string",
      "enum": [
        "none",
        "brc31"
      ]
    },
    "boundHeaders": {
      "description": "BRC-120 header names bound by the service; defaults to supplied request headers",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "url"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
```

[All tools](https://bsvmcp.com/docs/tools)