82trust / 100

Compile Policy

by Oblique Markets in Markets & finance

x402 APIPassing, checked 4 h ago

Use when an agent needs compile policy. Returns Compile a merchant payment policy across x402, MPP, AP2, and card rails from product, risk, authorization, latency, asset, and refund constraints. $0.02.

POST https://api.oblique.markets/api/v1/paid/compile-policy

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
41 ms typical, 41 ms slowest 5%
Last check
4 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://api.oblique.markets/api/v1/paid/compile-policy" \
  -H "content-type: application/json" \
  -d '{"human_authorization_required":true,"max_latency_ms":1,"max_price_usdc":1,"product_type":"digital_retrieval","refund_capability":true,"reversible":true,"supported_assets":["example"]}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.oblique.markets%2Fapi%2Fv1%2Fpaid%2Fcompile-policy
const res = await pay("https://api.oblique.markets/api/v1/paid/compile-policy", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"human_authorization_required":true,"max_latency_ms":1,"max_price_usdc":1,"product_type":"digital_retrieval","refund_capability":true,"reversible":true,"supported_assets":["example"]}),
});
console.log(await res.json());

Example input

{
  "human_authorization_required": true,
  "max_latency_ms": 1,
  "max_price_usdc": 1,
  "product_type": "digital_retrieval",
  "refund_capability": true,
  "reversible": true,
  "supported_assets": [
    "example"
  ]
}

Example output

{
  "authorization_policy": "Buyer authorization is required before settlement; enforce the stated per-call cap.",
  "deny_conditions": [
    "price exceeds max_price_usdc",
    "required human authorization is unavailable",
    "no supported settlement rail or asset",
    "refund requirement cannot be met"
  ],
  "policy_manifest": {
    "max_latency_ms": 3000,
    "product_type": "digital_retrieval",
    "reversible": false,
    "version": "1.0"
  },
  "receipt_schema": {
    "required": [
      "payment_id",
      "rail",
      "amount_usdc",
      "status",
      "settled_at"
    ],
    "type": "object"
  },
  "recommended_rails": [
    {
      "rail": "x402",
      "rationale": "Best fit for an automated digital retrieval with an immediate, bounded response.",
      "role": "primary settlement"
    },
    {
      "rail": "MPP",
      "rationale": "Useful when the buyer ecosystem already speaks machine payment protocols.",
      "role": "alternative settlement"
    },
    {
      "rail": "card",
      "rationale": "Provides broad coverage for buyers without a compatible crypto wallet.",
      "role": "fallback settlement"
    }
  ],
  "refund_owner": "merchant",
  "settlement_requirements": [
    "exact amount authorization",
    "idempotency key",
    "machine-readable receipt"
  ],
  "spending_cap_usdc": 0.02
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
4 h agoPassed40241 ms$0.02