Preview an x402 purchase without creating an intent
Preview an x402 purchase with StableOps before creating an Intent, including policy, approval, wallet, risk-gate, and projected budget outcomes.
/v1/agent-payments/runtime/preview/x402Authorization
agentKey Paste the Agent Key bound to one payment agent. Agent Keys only work on Runtime endpoints.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/agent-payments/runtime/preview/x402" \ -H "Content-Type: application/json" \ -d '{ "method": "GET", "resource_url": "http://example.com", "requirements": { "x402_version": 2, "scheme": "exact", "network": "string", "asset": "string", "pay_to": "string", "max_amount_atomic": "string", "max_timeout_seconds": 1, "extra": { "property1": null, "property2": null } } }'{
"preview_only": true,
"budget_reserved": false,
"evaluated_at": "2019-08-24T14:15:22Z",
"decision": "automatic",
"can_create_intent": true,
"reasons": [
"string"
],
"warnings": [
"string"
],
"required_approvals": 0,
"normalized": {
"method": "GET",
"request_body_hash": "string",
"request_content_type": "string",
"resource_url": "string",
"origin": "string",
"network": "eip155:1",
"asset": "USDC",
"asset_contract": "string",
"asset_decimals": 1,
"pay_to": "string",
"max_amount_atomic": "string",
"budget_amount_atomic": "string"
},
"policy": {
"source": "active",
"version_id": "string",
"version": 1,
"origin_allowed": true,
"pay_to_allowed": true,
"network_and_asset_allowed": true,
"amount_within_limit": true,
"amount_within_automatic_threshold": true
},
"wallet": {
"ready": true,
"wallet_id": "string"
},
"budget": {
"asset": "USDC",
"decimals": 6,
"amount_atomic": "string",
"window_start": "2019-08-24T14:15:22Z",
"window_end": "2019-08-24T14:15:22Z",
"organization": {
"limit_atomic": "string",
"reserved_atomic": "string",
"committed_atomic": "string",
"settled_atomic": "string",
"available_atomic": "string",
"projected_available_atomic": "string",
"sufficient": true,
"utilization_bps": 0,
"projected_utilization_bps": 0,
"status": "healthy",
"projected_status": "healthy"
},
"agent": {
"limit_atomic": "string",
"reserved_atomic": "string",
"committed_atomic": "string",
"settled_atomic": "string",
"available_atomic": "string",
"projected_available_atomic": "string",
"sufficient": true,
"utilization_bps": 0,
"projected_utilization_bps": 0,
"status": "healthy",
"projected_status": "healthy"
}
},
"controls": {
"environment_allowed": true,
"circuit_breaker_allowed": true,
"recipient_risk_screening": "not_required"
},
"resource_quality": {
"scope": "organization_environment",
"sample_size": 0,
"responses_received": 0,
"failures": 0,
"unknown": 0,
"response_rate_bps": 0,
"confidence": "none",
"last_response_at": "2019-08-24T14:15:22Z"
}
}How is this guide?
Last updated
Create an x402 payment intent POST
Create an x402 payment intent. Review the StableOps Agent Payments API endpoint, its authentication, request parameters, validation rules, response fields.
Retrieve an x402 payment intent GET
Retrieve an x402 payment intent. Review the StableOps Agent Payments API endpoint, its authentication, request parameters, validation rules, response fields.