Skip to main content

Virtual card integration for Sardis payment platform

Project description

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

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

sardis_cards-0.2.1.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

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

sardis_cards-0.2.1-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

Details for the file sardis_cards-0.2.1.tar.gz.

File metadata

  • Download URL: sardis_cards-0.2.1.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for sardis_cards-0.2.1.tar.gz
Algorithm Hash digest
SHA256 c6d88e2ec50558a3f5c70044665993f1e4d27d2432f5b8895ac5253a4fe541fb
MD5 64d199ff51b8dd978ef45844b61439cd
BLAKE2b-256 22d8fd93e9d9cb6f34113876b61cb9971c6c8665459c1e8c5b6c5ef356527120

See more details on using hashes here.

File details

Details for the file sardis_cards-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: sardis_cards-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 27.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for sardis_cards-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b364e7680056dbc21f50e1975f72c70a24f06b185860cddd99422e6533b0fb32
MD5 dd3b3e470da65176dab2933f8838258b
BLAKE2b-256 a1d71b9e897ef18ccc689f1415a857cb3d81e7c4f7abbc82fe1609d58abf6048

See more details on using hashes here.

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