OceanAltOceanAlt

STANDARD CONTRIBUTION · REPRODUCIBLE

x402 Compliance Conformance Pack v0.1

A machine-readable contract for pre-settlement compliance in agent payments (x402 / MCP): every compliance outcome maps to a stable reason_code, a signal_class, and a retry rule. Grounded 1:1 in our live 11-gate gateway, reproducible against a free endpoint.

CURRENT STATUS

Endpoints return reason_code / signal_class / retry / retry_hint today (HTTP status stays 200/403/409). 451/-4510 wire mapping = proposed, not yet shipped (changing a live status code is breaking; needs versioned negotiation).

1 · Signal classes & retry rules

signal_classmeaningretry
okno blocking signalnot_applicable
paymentbudget / limit (fundable)retryable_after_funding
regulatorydeterministic compliance FAILnon_retryable
authorizationattribution / mandate / allowlistretry_after_authorization
uncertainscreening unavailable / inconclusivepolicy_dependent_backoff
client_errormalformed requestretry_after_fix

The point: a budget refusal, a regulatory refusal, and a temporary infra failure can look identical to an autonomous client yet each needs different handling. Standardizing retry per class prevents both silent PASS-through and infinite retry loops (LangChain/AutoGen/CrewAI).

2 · reason_code taxonomy (mapped to real gates)

reason_codesignal_classretryfrom
kya_unattributedauthorizationretry_after_authorizationKYA
mandate_revokedauthorizationnon_retryableKYA/Revoked
kya_proof_missingauthorizationretry_after_authorizationKYA/Proof
kyc_requiredauthorizationretry_after_authorizationKYA/KYC
invalid_inputclient_errorretry_after_fixInput
over_per_tx_limitpaymentretryable_after_fundingFirewall/Limit
over_daily_limitpaymentretryable_after_fundingFirewall/Velocity
payee_not_allowlistedauthorizationretry_after_authorizationFirewall/Allowlist
mandate_intent_mismatchauthorizationretry_after_authorizationMandate
sanctioned_or_high_risk_payeeregulatorynon_retryableScreening/AML
behavioral_anomalyuncertainpolicy_dependent_backoffBehavior/Anomaly
replay_detectedauthorizationnon_retryableMandate/Replay
clearoknot_applicableallow
elevated_risk_payeeuncertainpolicy_dependent_backoffscreening: review
screening_unavailableuncertainpolicy_dependent_backoffscreening unavailable
free_allowance_exhaustedpaymentretryable_after_fundinganonymous monthly allowance used up on /api/decide, /api/risk or /api/payee/decide (HTTP 402): pay per call or use a free key
screening_partially_unavailableuncertainpolicy_dependent_backoffscreening: part of the on-chain data could not be fetched and nothing else was found; re-check later
payment_request_untrustedauthorizationnon_retryablePOST /api/payment-request: spoofed sender, phishing link, listed payee, AI-aimed instructions, or a changed-payment-details pattern
payment_request_needs_confirmationuncertainretry_after_authorizationPOST /api/payment-request: suspicious traits worth confirming through a trusted channel
phishing_endpointregulatorynon_retryableGET /api/endpoint: the URL or its parent domain is on a phishing-domain list
elevated_risk_endpointuncertainpolicy_dependent_backoffGET /api/endpoint: suspicious hostname shape or an unknown host
payee_differs_from_listingauthorizationretry_after_authorizationPOST /api/decide: payment_intent.payee differs from the payout wallet listed for resource_ref in the public x402 directory
payee_changed_since_previousauthorizationretry_after_authorizationPOST /api/decide: payee, network or asset differs from previous_payment_intent
payee_not_bound_to_originauthorizationretry_after_fixPOST /api/decide: the origin of payment_intent.resource_ref quotes a different payee (RAP §6.5, proposed)
payee_origin_binding_unavailableuncertainpolicy_dependent_backoffPOST /api/decide: the origin of payment_intent.resource_ref could not be checked (RAP §6.5, proposed)
payee_not_authorized_by_originauthorizationretry_after_authorizationPOST /api/decide: the controller of the resource_ref origin published a signed payout-address list for this network that does not include the payee (payee_authorization.status not_bound); raises allow to review
payee_change_not_authorized_by_originauthorizationretry_after_authorizationPOST /api/decide: the payee changed since previous_payment_intent and the origin's signed payout-address list excludes the new payee; decline
payee_is_token_contractclient_errorretry_after_fixscreening: payee is a token contract address, not a recipient
payer_screening_declinedregulatorynon_retryablex402 paid endpoints: the paying wallet is on a sanctions or risk list, so OceanAlt does not settle the payment
idempotency_key_invalidclient_errorretry_after_fixPOST /api/pay: malformed Idempotency-Key (400)
idempotency_key_reusedclient_errorretry_after_fixPOST /api/pay: Idempotency-Key reused with a different body (422)
idempotency_request_in_progressuncertainpolicy_dependent_backoffPOST /api/pay: original request with this Idempotency-Key still running (409)
key_scope_deniedauthorizationretry_after_authorizationAPI key restricted to other scopes by its holder (403)
key_ip_deniedauthorizationretry_after_authorizationAPI key restricted to an IP allowlist by its holder; this request came from elsewhere (403)
x402_v1_payment_unmatchedclient_errorretry_after_fixx402 paid endpoints: an x402 v1 payment header that matches none of the offered requirements (402 with payment_error)
beta_wallet_daily_limitpaymentpolicy_dependent_backoffpaid endpoints on mainnet: this wallet reached its daily call limit (429); nothing was settled
beta_ip_daily_limitpaymentpolicy_dependent_backoffpaid endpoints on mainnet: this caller reached its daily call limit (429)
beta_global_daily_limitpaymentpolicy_dependent_backoffpaid endpoints on mainnet: the daily limit for all callers was reached (429)
beta_monthly_fee_cappaymentpolicy_dependent_backoffpaid endpoints on mainnet: the monthly fee cap was reached (429)
mainnet_disableduncertainpolicy_dependent_backoffpaid endpoints on mainnet: paid access is closed (503); free tools are unaffected
mainnet_kill_switchuncertainpolicy_dependent_backoffpaid endpoints on mainnet: paid access is paused for maintenance (503); free tools are unaffected
mainnet_guard_unavailableuncertainpolicy_dependent_backoffPOST /api/mpp/decision: the pre-payment guard could not be evaluated (503); nothing was charged
geo_blockedregulatorynon_retryablepaid endpoints on mainnet: paid access is not offered in the caller's region (451)
decision_failed_after_paymentuncertainnon_retryablePOST /api/mpp/decision: the payment settled but no decision was produced (503); recorded for a manual refund, do not treat it as allow and do not pay again for the same call
credit_malformedclient_errorretry_after_fixPOST /api/x402/decision with a credit token: the token is malformed (403)
credit_unknownclient_errorretry_after_fixPOST /api/x402/decision with a credit token: the token is not known (403)
credit_pendingpaymentpolicy_dependent_backoffPOST /api/x402/decision with a credit token: the pack's payment has not settled yet (403)
credit_failedpaymentretryable_after_fundingPOST /api/x402/decision with a credit token: the pack's payment never settled, so it never activated (403)
credit_revokedauthorizationnon_retryablePOST /api/x402/decision with a credit token: the pack was revoked (403)
credit_expiredpaymentretryable_after_fundingPOST /api/x402/decision with a credit token: the pack expired (402); buy a new one at POST /api/x402/credits
credit_exhaustedpaymentretryable_after_fundingPOST /api/x402/decision with a credit token: no credits left (402); buy a new pack at POST /api/x402/credits
mandate_signature_invalidauthorizationnon_retryablePOST /api/mandate/check: mandate_signature_check.reason_code when the mandate signature does not verify
mandate_signature_unverifiableuncertainpolicy_dependent_backoffPOST /api/mandate/check: mandate_signature_check.reason_code when the signature could not be checked
okoknot_applicablePOST /api/x402/verify-requirements: the signed payment requirements verify under the seller's published key
no_signatureuncertainnot_applicablePOST /api/x402/verify-requirements: the 402 response carries no signed requirements, so nothing was verified
digest_mismatchauthorizationnon_retryablePOST /api/x402/verify-requirements: the protected fields differ from the digest the seller signed
signature_invalidauthorizationnon_retryablePOST /api/x402/verify-requirements: the signature does not verify under the seller's published key
key_unavailableuncertainpolicy_dependent_backoffPOST /api/x402/verify-requirements: no public key with that key_id at the seller's keys_url
payto_mismatchauthorizationnon_retryablePOST /api/x402/verify-requirements: the signed requirements are genuine but name a different payTo
amount_mismatchauthorizationnon_retryablePOST /api/x402/verify-requirements: the signed requirements are genuine but name a different amount

The test vectors and the gateway use the same rules.

3 · Reproducible test vectors (free endpoint)

① Sanctioned payee → regulatory / non_retryable

curl "https://oceanalt.com/api/risk?addr=0x8589427373D6D84E98730D7795D8f6f8731FDA16"
# → verdict:"risky", reason_code:"sanctioned_or_high_risk_payee", signal_class:"regulatory", retry:"non_retryable"

② Clear payee → ok / not_applicable

curl "https://oceanalt.com/api/risk?addr=0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
# → verdict:"clear", reason_code:"clear", signal_class:"ok", retry:"not_applicable"

Provenance & non-claims: reason_code and retry are produced by the live gateway (/api/pay, /api/x402/decision, /api/risk); this page and the JSON are generated from the same source. Multi-transport (stdio/SSE/streamable) wire observations and the 451/-4510 mapping are not yet implemented. They are listed as proposed and will be contributed as reproducible vectors once they run, never as forward-looking claims. Compliance screening ≠ full/licensed AML compliance; clear/allow ≠ absolute safety.