StableOps turns on-chain stablecoin transfers into familiar payment primitives: payment orders, deterministic status transitions, signed webhooks, retries, and confirmation tracking. StableOps watches supported chains, matches transfers, tracks confirmations, checks reorgs, and delivers webhook events to your app.
This SDK is for server-side Python applications that create payment orders and checkout sessions, manage merchant subscriptions, webhooks and agent audit resources, and verify webhook signatures.
- Type-safe client (Pydantic v2 models) for payment orders, checkout sessions, merchant subscriptions, and webhooks.
- Sync (
StableOps) and async (AsyncStableOps) clients with an identical API. - Conservative retries for reads plus explicitly idempotent payment-order and checkout-session creation; other writes are never retried automatically.
- Constant-time webhook signature verification.
- Python 3.8 or newer.
- A StableOps API key.
- A server-side environment. Do not expose your API key in browser code.
pip install stableopsimport os
from stableops import StableOps
client = StableOps(api_key=os.environ["STABLEOPS_API_KEY"])
order = client.payment_orders.create(
merchant_order_id="order_123",
amount="49.00",
accepted_assets=[
{"chain": "base", "asset": "USDC"},
{"chain": "tron", "asset": "USDT"},
],
expires_at="2026-12-31T23:59:59Z",
)
print(order.payment_instructions)The environment (sandbox / live) is determined by the API key prefix
(sk_sandbox_… / sk_live_…). Return only the order id, amount, and
payment_instructions to your frontend; the API key stays on your server.
For complete guides, configuration, checkout sessions, webhook verification, and the full API reference, see the official documentation:
- English docs: https://stableops.dev/en/docs/sdk/python-api-sdk
- Chinese docs: https://stableops.dev/zh/docs/sdk/python-api-sdk
- Chains: Ethereum, Base, Arbitrum, Polygon, Optimism, BSC, TRON, Solana, and supported testnets.
- Assets: USDC and USDT.
This SDK is licensed under Apache-2.0. See LICENSE.