Skip to main content

StableOps Python SDK

PyPI version PyPI downloads License Python

中文文档

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, manage webhook endpoints, and verify webhook signatures.

Features

  • 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.
  • Built-in request retries and explicit idempotency for write operations.
  • Constant-time webhook signature verification.

Requirements

  • Python 3.8 or newer.
  • A StableOps API key.
  • A server-side environment. Do not expose your API key in browser code.

Installation

pip install stableops

Quick Start

import 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.

Documentation

For complete guides, configuration, checkout sessions, webhook verification, and the full API reference, see the official documentation:

Supported Chains and Assets

  • Chains: Ethereum, Base, Arbitrum, Polygon, Optimism, BSC, TRON, Solana, and supported testnets.
  • Assets: USDC and USDT.

License

This SDK is licensed under Apache-2.0. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stableops-1.0.0.tar.gz (32.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stableops-1.0.0-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

Details for the file stableops-1.0.0.tar.gz.

File metadata

  • Download URL: stableops-1.0.0.tar.gz
  • Upload date:
  • Size: 32.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for stableops-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f94efd29e8506f5239863a41067421e9fae4d831ca90bf9239f432019f302ab0
MD5 14d49aaa98b551d263c5e9d6aac92359
BLAKE2b-256 9cfb983dc256d553bb349849e54df4b073e492bc53e166f4fd5ceadb54994836

See more details on using hashes here.

Provenance

The following attestation bundles were made for stableops-1.0.0.tar.gz:

Publisher: publish.yml on StableOps/stableops-api-python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stableops-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: stableops-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 27.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for stableops-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f11f610ec9ff9353f57c3741a35ab10e3dd37285cbdc2629210170dcb320f260
MD5 19f7cc222e43d4e142d8b6dab96d925f
BLAKE2b-256 29d057ffa25d6e3346a8afe74ede7fec35943c803e61f1791da20db6f2abdf15

See more details on using hashes here.

Provenance

The following attestation bundles were made for stableops-1.0.0-py3-none-any.whl:

Publisher: publish.yml on StableOps/stableops-api-python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

0.13.0

2 files

0.12.0

2 files

0.10.4

2 files

0.7.2

2 files

0.7.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page