SHAM CASHDEVELOPER PLATFORM

ShamCash API, in Python.

The open-source shamcash package connects your Python application to our independent API platform. Use synchronous or asynchronous clients to link accounts, read balances and incoming transfers, and manage subscriptions.

pip install shamcash

Python 3.8+. Amounts use Decimal, and timestamps are timezone-aware.

Before your first request

  1. Create a platform account and link your ShamCash account by scanning its QR code.
  2. Activate an eligible trial or paid subscription for the linked account.
  3. Create your API token from the dashboard. Keep it on your server, outside source control and browser code.

Read balances and incoming transfers

from shamcash import ShamCashAPISync

with ShamCashAPISync(api_token="YOUR_API_TOKEN") as client:
    accounts = client.list_accounts()
    account = accounts[0]
    balances = client.get_balances(account.id)
    transfers = client.list_transactions(account.id, limit=20)

    for transfer in transfers.transactions:
        print(transfer.transaction_id, transfer.amount)

This example assumes at least one linked account. In production, select the intended account ID and handle API errors and rate-limit responses.

Build the payment flow in your application

The SDK reads account data. Your application creates invoices, matches transaction IDs or note references, and credits customers once. Share one polling worker per linked account and respect the API rate limit.

See payment integration workflows

Account linking and subscriptions

The package supports QR linking sessions, relinking, prepaid subscriptions, auto-renewal and unlinking. Enable account management on your API token before using operations that change accounts or subscriptions. Read-only requests do not need that permission.

Read SDK examples on GitHub