Schema drift: valid vs isValid (loose check grants)

Quirk · GET /api/x402/facilitator-schema-drift · Facilitator Dependency

The facilitator returns { valid: true } instead of the spec's { isValid: true }; the merchant's loose field-name check grants access on the wrong key.

Explanation

The facilitator API drifted and now returns { valid: true } instead of the x402-specified { isValid: true }. The merchant's verification check (data?.valid || data?.isValid) was written to tolerate both field names, so it silently grants access on the wrong key. A correct merchant should check only the spec field (isValid) and treat a missing or unexpected shape as a verification failure, forcing an explicit update when the facilitator changes its contract.

What to watch

Returns 200 despite the field-name mismatch — a compliant client relying on isValid would have denied access.

Facilitator

The facilitator is mocked for this scenario — its response is simulated, so no live Radius testnet settlement occurs.

Metadata

Back to catalog