Skip to main content
POST
x402 Pay
Thương lượng và hoàn thành một thanh toán x402 cho URL mục tiêu. AgentWallex đánh giá chính sách của tác nhân, ký thanh toán qua MPC và trả về thông tin thanh toán cần thiết để truy cập tài nguyên trả phí.

Nội dung Yêu cầu

string
bắt buộc
Tác nhân có ví sẽ cung cấp thanh toán.
string
bắt buộc
URL hỗ trợ x402 để thanh toán (ví dụ: https://paid-api.example.com/v1/data).
string
ID phiên tùy chọn để trừ từ ngân sách phiên hiện có. Xem Phiên x402.
string
Định danh chuỗi CAIP-2 cho thanh toán (ví dụ: eip155:84532). Nếu bỏ qua, chuỗi mặc định của tác nhân được sử dụng.

Phản hồi

Ví dụ

Response

Endpoint Liên quan

Ủy quyền

X-API-Key
string
header
bắt buộc

API key authentication. Keys are prefixed with awx_.

Nội dung

application/json
agent_id
string
bắt buộc

The agent whose wallet will fund the payment.

target_url
string<uri>
bắt buộc

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.

Phản hồi

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.

Tùy chọn có sẵn:
completed,
pending,
failed
payment_signature
string

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