Skip to main content
POST
x402 Pay
为目标 URL 协商并完成一次 x402 支付。AgentWallex 评估代理的策略,通过 MPC 签署支付,并返回访问付费资源所需的支付信息。

请求体

string
必填
将为支付提供资金的代理。
string
必填
要支付的 x402 启用的 URL(例如 https://paid-api.example.com/v1/data)。
string
可选的会话 ID,用于从现有会话预算中扣除。请参阅 x402 会话
string
用于支付结算的 CAIP-2 链标识符(例如 eip155:84532)。如果省略,则使用代理的默认链。

响应

示例

Response

相关端点

授权

X-API-Key
string
header
必填

API key authentication. Keys are prefixed with awx_.

请求体

application/json
agent_id
string
必填

The agent whose wallet will fund the payment.

target_url
string<uri>
必填

The x402-enabled URL to pay for (e.g., https://paid-api.example.com/v1/data).

session_id
string

Optional session ID to deduct from an existing session budget.

chain
string

CAIP-2 chain identifier for payment settlement (e.g., eip155:84532). If omitted, the agent's default chain is used.

响应

Payment completed successfully.

Result of an x402 payment negotiation.

ledger_id
string

Internal ledger entry ID for this payment.

amount
string

Payment amount.

fee_amount
string

Platform fee deducted.

fee_rate
string

Fee percentage applied (based on tiered pricing).

token
string

Token used for payment (e.g., USDC).

chain
string

Chain used for settlement.

status
enum<string>

Payment status.

可用选项:
completed,
pending,
failed
payment_signature
string

The PAYMENT-SIGNATURE value to include in the retry request to the target URL.