Install
openclaw skills install agentpmt-agentaddressGenerate an AgentAddress wallet, buy AgentPMT credits with x402, and participate in the paid AgentPMT marketplace with signed tool/workflow calls.
openclaw skills install agentpmt-agentaddressUse this skill when an autonomous agent must:
Always call production external endpoints at https://www.agentpmt.com/api/external/....
Wallet and credits:
POST /api/external/agentaddressPOST /api/external/credits/purchasePOST /api/external/auth/sessionPOST /api/external/credits/balanceMarketplace tools:
GET /api/external/toolsPOST /api/external/tools/{productId}/invokeMarketplace workflows:
GET /api/external/workflowsPOST /api/external/workflows/{workflowId}/fetchPOST /api/external/workflows/{workflowId}/startPOST /api/external/workflows/activePOST /api/external/workflows/{workflowId}/endCredit pricing and validation:
100 credits = 1 USDcredits * 10000500-credit incrementsBase request body:
{
"wallet_address": "0x...",
"credits": 500,
"payment_method": "x402"
}
x402 purchase supports two modes:
PAYMENT-SIGNATURE handshake (server broadcast):
402 + PAYMENT-REQUIRED header (base64 JSON).TransferWithAuthorization.PAYMENT-SIGNATURE header (base64 JSON payload).transaction_hash proof (self-broadcast):
{
"wallet_address": "0x...",
"credits": 500,
"payment_method": "x402",
"transaction_hash": "0x..."
}
Pending handling:
202 with transaction_hash.POST /api/external/credits/purchase with that transaction_hash until non-202.Expected signing inputs from PAYMENT-REQUIRED.accepts[0]:
networkamountassetpayToextra.name and extra.versionSponsored top-up support:
wallet_address, include:
payer_wallet_address (payer onchain wallet)sponsor_signature (65-byte hex) from payer over:
agentpmt-external-sponsor
payer:{payer_lowercased}
recipient:{wallet_address_lowercased}
credits:{credits}
nonce:{eip3009_nonce}
transaction_hash proof mode, final line becomes: tx:{transaction_hash}.All signed external actions use this exact message template:
agentpmt-external
wallet:{wallet_lowercased}
session:{session_nonce}
request:{request_id}
action:{action}
product:{product_or_dash}
payload:{payload_hash}
Canonical payload hashing:
canonical_json = json.dumps(payload, sort_keys=True, separators=(",", ":"))payload_hash = sha256(canonical_json).hexdigest()Action mapping:
action = balanceproduct = -payload_hash = ""action = invokeproduct = {productId}payload_hash = sha256(canonical_json(parameters))action = workflow_fetchproduct = {workflowId}payload_hash = ""action = workflow_startproduct = {workflowId}payload_hash = sha256(canonical_json({"instance_id": instance_id})) (or empty object)action = workflow_activeproduct = -payload_hash = sha256(canonical_json({"instance_id": instance_id})) (or empty object)action = workflow_endproduct = {workflowId}payload_hash = sha256(canonical_json({"workflow_session_id": workflow_session_id})) (or empty object)GET /api/external/tools.POST /api/external/tools/{productId}/invoke.POST /api/external/credits/balance.Runtime credentials:
parameters._credentials.{
"_credentials": {
"google_oauth": {
"access_token": "ya29...",
"expires_at": "2026-02-17T12:00:00Z"
}
}
}
402 from purchase (first call): expected in PAYMENT-SIGNATURE mode, use PAYMENT-REQUIRED and retry.202 from purchase: pending settlement; continue polling with transaction_hash.402 from invoke: insufficient credits; purchase suggested amount and retry.409 on signed calls: duplicate request_id; generate a new one.401 on signed calls: signature/session mismatch; regenerate session and re-sign.400 purchase with pack-size detail: round credits to nearest 500 increment.request_id per signed call.examples/agentpmt_external_wallet_flow.mdexamples/agentpmt_paid_marketplace_quickstart.py