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 Sessions
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.