Linux 软件免费装
Banner图

x402 Pay

开发者 dufresnesteven
tellyworth
更新时间 2026年6月24日 09:38
PHP版本: 8.1 及以上
WordPress版本: 7.0
版权: GPLv3 or later
版权网址: 版权信息

标签

paywall micropayments usdc x402 http-402

下载

0.1.3

详情介绍:

x402 Pay gates selected WordPress posts behind an x402 payment. When a paywalled URL is requested without a valid Payment-Signature header, the plugin responds with HTTP 402 and a PAYMENT-REQUIRED payload describing how to pay. Bots, API clients, and browser-wallet users can sign a USDC transfer, retry the request, and get the response. Use it to: The plugin is inert until you pick a paywall mode in Settings → x402 Pay. The default mode is "No posts," so installing the plugin alone does not gate anything or contact any external service. Audience and modes Built-in facilitators

安装:

  1. Install and activate the plugin.
  2. Visit Settings → x402 Pay.
  3. Enter the wallet address that should receive payments.
  4. Pick a paywall mode and audience.
  5. Pick a facilitator. For Coinbase, paste your CDP API Key ID and secret.
  6. Save.

屏幕截图:

  • Switch to Coinbase CDP to accept USDC on Base mainnet using your CDP API key.
  • The paywall page a human reader sees, with pay buttons for popular wallets.

常见问题:

What does a paywalled request look like?

If the request does not carry a valid Payment-Signature header, the plugin returns HTTP 402 with a PAYMENT-REQUIRED response header containing the encoded x402 PaymentRequirements. Clients sign the requirements and retry the request.

Does this charge human readers?

Only if you set Audience to "Everyone." The default is "Only bots/crawlers" so humans see posts as normal and only detected bot/agent traffic gets a 402.

Do I need ETH to receive payments?

No. x402 uses EIP-3009 transferWithAuthorization; the facilitator pays gas. You only need USDC inbound.

Where are API keys stored?

Coinbase CDP secrets are stored in their own wp_options row, or can be supplied via a wp-config.php constant or environment variable so they stay out of the database entirely.

更新日志:

0.1.3 0.1.2 0.1.1 0.1.0