Overview

x402 Reliability Monitoring

CORTX runs a full synthetic payment through your x402 endpoint every few minutes — not just a ping, but a real end-to-end payment flow. It records evidence at every stage, opens incidents on consecutive failures, and sends Telegram alerts.

Built for Bankr builders who need to know if their paid API is actually working end-to-end, not just “up.”

The 7-Stage Pipeline

Each check runs all 7 stages in sequence. A stage failure stops the check and records which stage failed and why.

01
availability
Checks that the endpoint is reachable over HTTP.
02
payment_terms
Validates the 402 response and parses the X-Payment-Required header.
03
price_check
Confirms the requested price is within your expected and max bounds.
04
payment
Signs an EIP-3009 transferWithAuthorization via x402/client and builds the X-Payment header.
05
delivery
Resends the request with the payment header and expects a 200 response.
06
json_parse
Parses the response body as valid JSON.
07
schema_validation
Validates the parsed JSON against your expected schema using AJV.

Get Started

Quickstart

From sign-up to your first live check in under 5 minutes.

1
Sign up
Go to your CORTX invite link and create an account with your email.
2
Add a service
Click "Add Service" from the Overview page and paste your x402 endpoint URL.
3
Auto-detect
CORTX probes the endpoint, reads the X-Payment-Required header, and pre-fills expected price, max price, and network.
4
Review & configure
Confirm the detected values, set your check interval, and optionally paste an expected JSON Schema.
5
Run first check
Hit "Run Check" to execute the full 7-stage pipeline immediately and see the result.
6
Go live
Your service is now monitored. Checks run on your configured interval via cron. Set up Telegram alerts in Settings → Alerts.

Concepts

How CORTX Works

Every check is a full synthetic payment — not a health ping. Here is what happens at each stage.

01availabilityAvailability

CORTX sends an HTTP GET to your endpoint URL. If the server is unreachable or returns a non-2xx/402 response, the check fails here. A 402 is the expected response at this stage — it means the endpoint is alive and asking for payment.

02payment_termsPayment Terms

CORTX reads the X-Payment-Required response header from the 402. It parses the JSON payment terms: network, asset, amount, recipient address, and EIP-712 domain info. If the header is missing, malformed, or unsigned, the check fails here.

03price_checkPrice Check

The parsed price is compared against your configured Expected Price and Max Price. If the endpoint is charging more than your max, the check fails to protect your wallet. If the price differs from expected, the incident notes the discrepancy.

04paymentPayment

CORTX uses the x402/client npm package to sign an EIP-3009 transferWithAuthorization — a gasless USDC transfer on Base. The private key in CORTX_TEST_WALLET_KEY signs the EIP-712 message. The resulting signature is encoded into an X-Payment header.

05deliveryDelivery

The original request is re-sent with the X-Payment header attached. CORTX expects a 200 response. Any other status code — including another 402 — causes a critical failure at this stage, since payment was sent but delivery was not received.

06json_parseJSON Parse

The response body (capped at 1 MB) is parsed as JSON. If the body is not valid JSON, the check fails. This stage runs regardless of whether you have a schema configured.

07schema_validationSchema

If you provided an Expected Schema, AJV validates the parsed JSON against it. Any schema violation — missing required field, wrong type, additional property when not allowed — fails the check. This stage is skipped when no schema is configured.

Failure severity — Stages 1–3 produce a degraded incident. Stages 4–7 (payment through schema) produce a critical incident.

Concepts

Incidents

CORTX automatically manages an incident lifecycle based on consecutive check results.

Opening

An incident opens after 2 consecutive failed checks at the same stage. A single transient failure is recorded but does not page you. This reduces noise from momentary network issues.

Severity

Degraded
Stages 1–3: availability, payment_terms, price_check
Critical
Stages 4–7: payment, delivery, json_parse, schema_validation

Lifecycle

openedSecond consecutive failure. Telegram alert sent.
severity_increasedIncident escalated from degraded → critical. Second alert sent.
resolvedNext check passes. Incident closed, third alert sent.
infra errors ≠ incidents — Checks with status error (RPC failures, network timeouts) never open incidents. Only failed checks count toward the consecutive failure threshold.

Guides

Configure a Service

Use the 3-step onboarding wizard (Services → Add Service) or edit an existing service.

FieldRequiredExampleDescription
Endpoint URLYeshttps://x402.bankr.bot/researchThe x402-protected URL CORTX will probe.
Expected PriceYes0.01The USDC price you expect the endpoint to charge. Alerts if it changes.
Max PriceYes0.05The ceiling CORTX will pay per check. Checks fail at price_check if exceeded.
Check IntervalYes5Minutes between synthetic checks (minimum 1, recommended 5).
EnvironmentYesmainnetmainnet uses real USDC on Base. Testnet support coming.
Expected SchemaNo{ "type": "object", … }AJV-compatible JSON Schema. Leave blank to skip schema_validation.

JSON Schema Example

If your endpoint returns structured JSON, paste an AJV-compatible schema. CORTX will validate every response against it.

{
  "type": "object",
  "required": [
    "result",
    "timestamp"
  ],
  "properties": {
    "result": {
      "type": "string"
    },
    "timestamp": {
      "type": "number"
    },
    "data": {
      "type": "object"
    }
  }
}

Guides

Telegram Alerts

CORTX can send Telegram messages when incidents open, escalate, or resolve.

Connect your account

01Go to Settings → Alerts.
02Click "Connect Telegram" — a deep-link token is generated (expires in 10 minutes).
03Open the link in Telegram. The bot sends a confirmation message.
04Your Telegram account is now linked to CORTX.

Alert events

on_open
Incident opened
Fires when a new incident opens (2nd consecutive failure).
on_severity_increase
Severity escalated
Fires when an open incident goes from degraded → critical.
on_resolve
Incident resolved
Fires when the incident closes after a passing check.

Each event can be toggled independently per service in Settings → Alerts.

Reference

Spend Caps

CORTX enforces cumulative spend limits to prevent runaway costs across all services.

Daily cap
$1.00 USDC
CORTX_DAILY_SPEND_CAP_USDC
Resets at UTC midnight.
Monthly cap
$10.00 USDC
CORTX_MONTHLY_SPEND_CAP_USDC
Resets on the 1st of each month (UTC).
When a cap is reached, checks are skipped silently — no incident is opened. Checks resume automatically after the cap resets. Monitor your spend in the Admin dashboard.

Planning your spend

Price / callIntervalDaily costMonthly cost
$0.015 min$2.88$86.40
$0.0115 min$0.96$28.80
$0.055 min$14.40$432
$0.0515 min$4.80$144
$5.0060 min$120$3,600

Reference

FAQ

Does CORTX spend real money on every check?
Yes — each check that reaches the payment stage signs a real USDC transfer on Base mainnet. Set your check interval and max price carefully. Spend caps (daily and monthly) prevent runaway costs.
What are the default spend caps?
Daily cap: $1.00 USDC. Monthly cap: $10.00 USDC. Checks are skipped when a cap is reached and resume after it resets (UTC midnight for daily, 1st of month for monthly). Override with CORTX_DAILY_SPEND_CAP_USDC and CORTX_MONTHLY_SPEND_CAP_USDC env vars.
What private key does CORTX use?
CORTX uses a dedicated test wallet funded with a small amount of USDC — just enough for synthetic checks. Set the 0x-prefixed 32-byte key in CORTX_TEST_WALLET_KEY. Never use a wallet that holds significant funds.
What is the difference between "failed" and "error" status?
"failed" means a check stage returned a bad result — your endpoint has a problem. "error" means CORTX itself had an infrastructure issue (network timeout, RPC error). Only "failed" statuses open incidents.
How many consecutive failures open an incident?
2. A single transient failure is silently recorded but does not page you. Two back-to-back failures at the same stage open an incident.
Can I share my status page publicly?
Yes. Every CORTX account has a public status page at /status/[your-user-id] — no login required. It shows 90-day uptime bars per service and any active incidents.
Does schema validation always run?
Only if you provide an Expected Schema when configuring your service. If left blank, stage 7 is skipped and the check passes after a successful JSON parse.
What chains and tokens does CORTX support?
Base mainnet only, USDC (ERC-20 at 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913). This is the standard for x402 on Bankr.
Can I monitor endpoints on other chains?
Not yet. Multi-chain support (Ethereum, Arbitrum, Optimism) is on the roadmap.
Guide
Understanding CORTX costs
Per-stage breakdown, spend caps, cost matrix, and planning calculators.