sardis-cards
Virtual card integration for Sardis payment platform.
Overview
This package provides virtual card issuance and management capabilities for AI agent wallets. It supports multiple card providers with Lithic as the primary integration.
Supported Providers
- Lithic (recommended) - Developer-friendly API, used by Mercury, Brex, Ramp
- Mock - For testing and development
Features
- Issue virtual cards linked to agent wallets
- Pre-load cards from stablecoin balances or bank transfers
- Per-transaction, daily, and monthly spending limits
- Merchant category controls
- Real-time transaction webhooks
- Card freeze/unfreeze operations
Installation
pip install sardis-cards
# With Lithic provider
pip install sardis-cards[lithic]
Quick Start
from sardis_cards import CardService
from sardis_cards.providers.lithic import LithicProvider
# Initialize provider
provider = LithicProvider(api_key="your_lithic_api_key")
service = CardService(provider=provider)
# Issue a virtual card
card = await service.issue_card(
wallet_id="wallet_123",
card_type="virtual",
limit_per_tx=500.00,
limit_daily=2000.00,
)
# Fund the card
await service.fund_card(
card_id=card.card_id,
amount=100.00,
source="stablecoin",
)
# Get card details
card = await service.get_card(card_id=card.card_id)
Webhooks
Handle card transaction webhooks:
from sardis_cards.webhooks import CardWebhookHandler
handler = CardWebhookHandler(secret="your_webhook_secret")
@app.post("/webhooks/cards")
async def handle_card_webhook(request: Request):
event = handler.verify_and_parse(
payload=await request.body(),
signature=request.headers.get("X-Lithic-Signature"),
)
if event.type == "transaction.created":
# Handle new transaction
pass
Configuration
Set environment variables:
LITHIC_API_KEY=your_api_key
LITHIC_ENVIRONMENT=sandbox # or production
LITHIC_WEBHOOK_SECRET=your_webhook_secret
License
MIT
Metadata
Release files for sardis-cards 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sardis_cards-1.1.0.tar.gz | 62.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sardis_cards-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 133.6 kB
Release files / sardis_cards-1.1.0.tar.gz
| Download URL | sardis_cards-1.1.0.tar.gz |
|---|---|
| Size | 62.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7df9e92ccd01a3a4e5afe1c04c8b4d865a03790bd1c28016bc540fa784562a5
|
|
BLAKE2b-256 checksum How to use checksums |
f0be477ec3da07f02fa648ad7d162449947692b3ef0a7281c067eefece0ddbd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / sardis_cards-1.1.0-py3-none-any.whl
| Download URL | sardis_cards-1.1.0-py3-none-any.whl |
|---|---|
| Size | 71.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5701144859eb2ceea673c9f45f65a27dcb61036d5e9ba7ab311b28571a920179
|
|
BLAKE2b-256 checksum How to use checksums |
1a094c6d921b7c626448079819d220839a55e8876bcdad50c87d739fba947e96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|