Skip to main content
Glama

x402 Pay — USDC API Payment Helper

Check Payment

check_payment
Read-onlyIdempotent

Inspect a public HTTPS URL for a fresh x402 v2 HTTP 402 challenge using an unsigned GET with a 10-second network timeout and no redirect following. Returns validated payTo, asset, network, atomic amount, resource and maxTimeoutSeconds; incomplete or non-x402 responses return challenge=null and a reason. Does not sign, settle or verify receipts. Fresh requirements override documented receiver hints; inspect canonical_receiver_match before choosing to pay.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesFull public HTTPS URL to inspect with an unsigned GET. No payment headers; redirects, credentials and private network targets are rejected.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNo
is_x402YesTrue only for HTTP 402 with complete validated x402 v2 requirements.
challengeYesFresh validated requirements, or null. No synthetic defaults are inserted.
http_statusYesObserved HTTP status; zero means no HTTP response was received.
raw_headersNoAllowlisted response headers only; never cookies or authentication headers.
payment_sentYes
missing_fieldsNo
canonical_receiver_matchNoComparison with documented SML receiver; a mismatch never rewrites upstream requirements.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / url / description
      Added value: +"Full public HTTPS URL to inspect with an unsigned GET. No payment headers; redirects, credentials and private network targets are rejected."
    • addedInput schema / properties / url / format
      Added value: +"uri"
    • addedInput schema / properties / url / pattern
      Added value: +"^https://"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "allOf": [
      +    {
      +      "else": {
      +        "properties": {
      +          "challenge": {
      +            "type": "null"
      +          }
      +        }
      +      },
      +      "if": {
      +        "properties": {
      +          "is_x402": {
      +            "const": true
      +          }
      +        }
      +      },
      +      "then": {
      +        "properties": {
      +          "challenge": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "amount": {
      +                "pattern": "^[0-9]+$",
      +                "type": "string"
      +              },
      +              "asset": {
      +                "description": "Asset identifier from the fresh requirements; never replaced with a cached symbol.",
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "maxTimeoutSeconds": {
      +                "maximum": 3600,
      +                "minimum": 1,
      +                "type": "integer"
      +              },
      +              "network": {
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "payTo": {
      +                "pattern": "^0x[a-fA-F0-9]{40}$",
      +                "type": "string"
      +              },
      +              "resource": {
      +                "description": "Exact resource URL or identifier advertised by the endpoint.",
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "scheme": {
      +                "description": "Payment scheme advertised by the fresh requirement.",
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "x402Version": {
      +                "const": 2
      +              }
      +            },
      +            "required": [
      +              "x402Version",
      +              "scheme",
      +              "payTo",
      +              "asset",
      +              "network",
      +              "amount",
      +              "resource",
      +              "maxTimeoutSeconds"
      +            ],
      +            "type": "object"
      +          },
      +          "http_status": {
      +            "const": 402
      +          }
      +        }
      +      }
      +    }
      +  ],
      +  "properties": {
      +    "canonical_receiver_match": {
      +      "description": "Comparison with documented SML receiver; a mismatch never rewrites upstream requirements.",
      +      "type": "boolean"
      +    },
      +    "challenge": {
      +      "description": "Fresh validated requirements, or null. No synthetic defaults are inserted.",
      +      "oneOf": [
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "amount": {
      +              "pattern": "^[0-9]+$",
      +              "type": "string"
      +            },
      +            "asset": {
      +              "description": "Asset identifier from the fresh requirements; never replaced with a cached symbol.",
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "maxTimeoutSeconds": {
      +              "maximum": 3600,
      +              "minimum": 1,
      +              "type": "integer"
      +            },
      +            "network": {
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "payTo": {
      +              "pattern": "^0x[a-fA-F0-9]{40}$",
      +              "type": "string"
      +            },
      +            "resource": {
      +              "description": "Exact resource URL or identifier advertised by the endpoint.",
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "scheme": {
      +              "description": "Payment scheme advertised by the fresh requirement.",
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "x402Version": {
      +              "const": 2
      +            }
      +          },
      +          "required": [
      +            "x402Version",
      +            "scheme",
      +            "payTo",
      +            "asset",
      +            "network",
      +            "amount",
      +            "resource",
      +            "maxTimeoutSeconds"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "http_status": {
      +      "description": "Observed HTTP status; zero means no HTTP response was received.",
      +      "maximum": 599,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "is_x402": {
      +      "description": "True only for HTTP 402 with complete validated x402 v2 requirements.",
      +      "type": "boolean"
      +    },
      +    "missing_fields": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "payment_sent": {
      +      "const": false
      +    },
      +    "raw_headers": {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "description": "Allowlisted response headers only; never cookies or authentication headers.",
      +      "type": "object"
      +    },
      +    "reason": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "is_x402",
      +    "http_status",
      +    "challenge",
      +    "payment_sent"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources