Official Python SDK for StableOps - Stablecoin payment infrastructure
Project description
StableOps Python SDK
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 webhook endpoints, and verify webhook signatures.
Features
- Type-safe client (Pydantic v2 models) for payment orders, checkout sessions, 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:
- English docs: https://stableops.dev/en/docs/sdk/python-api-sdk
- Chinese docs: https://stableops.dev/zh/docs/sdk/python-api-sdk
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stableops-0.7.1.tar.gz.
File metadata
- Download URL: stableops-0.7.1.tar.gz
- Upload date:
- Size: 26.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0e034ec3d91c3ab1fa182fc3458ab54218b91f0bd0c78bf1a04e231d1518a26
|
|
| MD5 |
86b68195fb296b478e55a5a21b0773c6
|
|
| BLAKE2b-256 |
78eb23fc3ca3f2b270da666d12f00bc08b3c88b00e3d8b2a5f61bc64868ba574
|
Provenance
The following attestation bundles were made for stableops-0.7.1.tar.gz:
Publisher:
publish.yml on StableOps/stableops-api-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stableops-0.7.1.tar.gz -
Subject digest:
a0e034ec3d91c3ab1fa182fc3458ab54218b91f0bd0c78bf1a04e231d1518a26 - Sigstore transparency entry: 2009189347
- Sigstore integration time:
-
Permalink:
StableOps/stableops-api-python-sdk@368f06a518fe067f5dffb6ff67ef80a42419418d -
Branch / Tag:
refs/tags/v0.7.1 - Owner: https://github.com/StableOps
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@368f06a518fe067f5dffb6ff67ef80a42419418d -
Trigger Event:
push
-
Statement type:
File details
Details for the file stableops-0.7.1-py3-none-any.whl.
File metadata
- Download URL: stableops-0.7.1-py3-none-any.whl
- Upload date:
- Size: 23.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b71fa657de4fe3f987672bb82e6225ca2aef5facce9dcc44a2617c474f1b02f4
|
|
| MD5 |
525b22edf1e5cda1a0b009abee3f69d2
|
|
| BLAKE2b-256 |
d85b4ffa5b42289eb3e008adb436d807f10dc15b7fdd8ded2f06affc2281dc79
|
Provenance
The following attestation bundles were made for stableops-0.7.1-py3-none-any.whl:
Publisher:
publish.yml on StableOps/stableops-api-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stableops-0.7.1-py3-none-any.whl -
Subject digest:
b71fa657de4fe3f987672bb82e6225ca2aef5facce9dcc44a2617c474f1b02f4 - Sigstore transparency entry: 2009189445
- Sigstore integration time:
-
Permalink:
StableOps/stableops-api-python-sdk@368f06a518fe067f5dffb6ff67ef80a42419418d -
Branch / Tag:
refs/tags/v0.7.1 - Owner: https://github.com/StableOps
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@368f06a518fe067f5dffb6ff67ef80a42419418d -
Trigger Event:
push
-
Statement type: