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.
Get Started
Quickstart
From sign-up to your first live check in under 5 minutes.
Concepts
How CORTX Works
Every check is a full synthetic payment — not a health ping. Here is what happens at each stage.
availabilityAvailabilityCORTX 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.
payment_termsPayment TermsCORTX 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.
price_checkPrice CheckThe 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.
paymentPaymentCORTX 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.
deliveryDeliveryThe 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.
json_parseJSON ParseThe 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.
schema_validationSchemaIf 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.
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
Lifecycle
openedSecond consecutive failure. Telegram alert sent.severity_increasedIncident escalated from degraded → critical. Second alert sent.resolvedNext check passes. Incident closed, third alert sent.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.
| Field | Required | Example | Description |
|---|---|---|---|
| Endpoint URL | Yes | https://x402.bankr.bot/research | The x402-protected URL CORTX will probe. |
| Expected Price | Yes | 0.01 | The USDC price you expect the endpoint to charge. Alerts if it changes. |
| Max Price | Yes | 0.05 | The ceiling CORTX will pay per check. Checks fail at price_check if exceeded. |
| Check Interval | Yes | 5 | Minutes between synthetic checks (minimum 1, recommended 5). |
| Environment | Yes | mainnet | mainnet uses real USDC on Base. Testnet support coming. |
| Expected Schema | No | { "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
Alert events
on_openon_severity_increaseon_resolveEach 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.
CORTX_DAILY_SPEND_CAP_USDCCORTX_MONTHLY_SPEND_CAP_USDCPlanning your spend
| Price / call | Interval | Daily cost | Monthly cost |
|---|---|---|---|
| $0.01 | 5 min | $2.88 | $86.40 |
| $0.01 | 15 min | $0.96 | $28.80 |
| $0.05 | 5 min | $14.40 | $432 |
| $0.05 | 15 min | $4.80 | $144 |
| $5.00 | 60 min | $120 | $3,600 |
Reference