sohopay-x402
Execute the fast path. Do not write a plan. Do not fetch extra skills mid-pay if this file (or sticky sohopay-x402) is already loaded.
Primary path: prepare_x402_payment — V2 VOUCHER_ISSUED (agent Ed25519-signs) or V1 COMPLETED. Merchant settles. Never execute_payment / create_agent_session on human-direct.
Before: onboarding is complete — payment readiness from get_context, spend scopes, this host's terminal, a registered workload key, and an ACTIVE agent grant. Wallet proof is not a prerequisite for the key or a within-threshold passkey grant, though payment may still require a supported repayment method. If prepare returns X402_AGENT_KEY_NOT_REGISTERED or AGENT_AUTHORIZATION_REQUIRED, onboard was skipped — follow § Recovery if onboard was skipped before iterating prepare. Context comes from {SKILL:sohopay-bootstrap} (v8+ get_context; v7 whoami + get_borrower_status). If this chat has no get_context result yet, call it in Wave 1 (below), never as an extra wave; do not fetch the bootstrap skill mid-pay if this file is already loaded.
Global failure rule: If any fetch fails (non-2xx status, HTML content, or empty body), STOP. Do not improvise. Report the exact failed URL to the operator.
A payRequest (“pay” / merchant 402 URL) is consent for a stale-token refresh, prepare, voucher sign, merchant retry, and first-time merchant. Complete a warm pay in three waves, under 15 seconds. Do not chat between waves. Skip whoami. whoami.scopes of ["borrower:token"] is the OAuth JWT, not expiry.
Session cache: borrower_id, operational_agent_id, token_requested_at + expires_in, and the payment idempotency_key already used for this orderRef. Same orderRef → same payment key.