Skip to main content

Official Python SDK for StableOps - Stablecoin payment infrastructure

Project description

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 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:

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


Download files

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

Source Distribution

stableops-0.7.2.tar.gz (26.7 kB view details)

Uploaded Source

Built Distribution

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

stableops-0.7.2-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for stableops-0.7.2.tar.gz
Algorithm Hash digest
SHA256 60a47b0aca65244494fb3ad911097a408c7135da97b3b726735e6c7c72c320a4
MD5 c20c686f11e649ec964960b1fb013c8a
BLAKE2b-256 93b6d08b408c76520e781ebd6b0982c6b19c217445d8ddb5110da41ac22de4a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for stableops-0.7.2.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-0.7.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for stableops-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f1720d20ad8ec9e54946a452a9d6230d238c7bf3651022a5a61fb921a6695c4c
MD5 77ed0768ff97dc9cd42156d367e4bcc3
BLAKE2b-256 77e1cf8abd4241151b698f008e7d30c9ba69a76095d29aa5553d73e0ea06bbe6

See more details on using hashes here.

Provenance

The following attestation bundles were made for stableops-0.7.2-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.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page