x402-payment

Documents the in-process x402 Circle Gateway micropayment flow for copy-trading fee charges.

17|3|Updated May 12, 2026
Ready to run
npx skills add https://github.com/aprin-labs/archimedes --skill x402-payment-aprin-labs
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: x402-payment
Source: https://github.com/aprin-labs/archimedes/tree/main/skills/x402-payment
Command: npx skills add https://github.com/aprin-labs/archimedes --skill x402-payment-aprin-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It explains how Archimedes actually charges copy-trading subscribers per pipeline step — an in-process 402-requirements → sign → verify → settle protocol over Circle Developer-Controlled Wallets — so engineers do not misread it as a public HTTP payment endpoint or mishandle the PAYMENTS_DRY_RUN safety switch. ## Core Features & Use Cases - Protocol walkthrough with line numbers: Traces the three-step charge flow (middleware.require, EIP-712 create_payment_header, verify/settle) through payments.py and service.py, including idempotency claims and 24h spend-cap reservations. - Dry-run and testnet posture: Documents where PAYMENTS_DRY_RUN gates every fund-moving method, why both money switches default to safe, and the Arc testnet-only configuration. - Custody and settlement model: Clarifies the custodial-interim DCW fee seam versus the non-custodial vault architecture, plus the three-stage settlement sweep in settlement.py. - Use Case: When modifying backend/archimedes/marketplace/payments.py, use this Skill to confirm that charge() never raises, that dry-run gating lives at call sites, and that circlekit is now imported in two files, not one. ## Quick Start Ask the AI to explain how Archimedes charges a copy-trading subscriber per tick and where PAYMENTS_DRY_RUN is enforced.

Frequently Asked Questions about x402-payment

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does Archimedes charge subscribers for copy-trading?▼

Archimedes charges a flat fee per named pipeline step using an in-process x402-style flow: middleware.require builds 402 payment requirements, the subscriber's Circle wallet signs an EIP-712 header, and the Circle facilitator verifies and settles the micropayment. There is no HTTP round-trip between publisher and subscriber.

What does PAYMENTS_DRY_RUN do in the marketplace payment flow?▼

PAYMENTS_DRY_RUN defaults to true and short-circuits every fund-moving path: _charge_one returns success without calling Circle, and all sweep/withdraw methods become logged no-ops. You must explicitly set it to false with real Circle credentials to exercise the real Gateway path, even on testnet.

Is the Archimedes marketplace payment flow on mainnet or testnet?▼

The fee flow is wired for Arc testnet only: DEFAULT_GATEWAY_CHAIN is arcTestnet and CIRCLE_BLOCKCHAIN is set to ARC-TESTNET. No mainnet money moves through this seam today.

Is the copy-trading fee mechanism non-custodial?▼

No. The fee flow runs through Circle Developer-Controlled Wallets whose entity secret the platform controls, making it custodial-interim by explicit team decision. The non-custodial ERC-4626 vault architecture is a separate money seam holding actual portfolio funds.

Why can a retried x402 payment header double-charge a subscriber?▼

x402 payment headers are not crash-retry-idempotent because a retry signs a fresh EIP-3009 nonce and settles as a second payment. Archimedes prevents this by claiming a SettlementIntent row before calling charge(), so retries short-circuit to already-settled.