sohopay-authorize-agent
Execute this grant in the same turn. Do not plan. Do not fall back to sign_transaction. Do not ask a chat question before the consent URL.
Before: MCP connected; workload key registered; borrower token includes credit:facility:accept. Wallet proof is not required for a within-threshold grant. Primary trigger: onboarding, immediately after register_agent_workload_key ({SKILL:sohopay-onboard}). prepare_x402_payment → AGENT_AUTHORIZATION_REQUIRED is recovery only (onboard was skipped).
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.
Consent link: open the consent_url returned by the challenge verbatim (…/agent/authorize#<challenge_id>) — never rebuild it from typed_data. Details: references/consent-page.md. Staging https://staging.sohopay.xyz/agent/authorize. Production https://sohopay.xyz/agent/authorize.
Onboarding defaults (no pending merchant): max_per_payment=1000000 (1 USDC), daily_limit=5000000 (5 USDC), valid_until ~7 days, omit allowed_merchant_ids. These are inside the passkey-only browser thresholds. On pay-time recovery, cover the pending payment; terms above the browser thresholds require an EOA signature in addition to passkey step-up.
Need credit:facility:accept on the borrower token. If it is missing, call request_borrower_token with that scope before the challenge. Do not ask before that token call.