Metadata-Version: 2.1
Name: hilt-sdk
Version: 1.0.0
Summary: Official Python SDK for Hilt's supported merchant contract.
Home-page: https://www.hilt.so
Author: Hilt
Author-email: support@hilt.so
License: UNLICENSED
Platform: UNKNOWN
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.31.0

# `hilt-sdk`

Official Python SDK for Hilt's supported merchant contract.

This SDK wraps the same public merchant routes documented on `docs.hilt.so`:

- products
- hosted checkout
- payments
- memberships
- receipts
- support
- webhooks

## Install from Hilt

```bash
pip install https://www.hilt.so/downloads/hilt_sdk-1.0.0-py3-none-any.whl
```

Or install the source distribution:

```bash
pip install https://www.hilt.so/downloads/hilt-sdk-1.0.0.tar.gz
```

### Verify the package checksum

```bash
curl -O https://www.hilt.so/downloads/hilt_sdk-1.0.0-py3-none-any.whl
curl -O https://www.hilt.so/downloads/hilt_sdk-1.0.0-py3-none-any.whl.sha256
sha256sum -c hilt_sdk-1.0.0-py3-none-any.whl.sha256
```

## Example

```python
from hilt_sdk import HiltClient

client = HiltClient(api_key="hk_live_...")

product = client.products.create(
    {
        "product_type": "PAYMENT_LINK",
        "title": "Members lounge",
        "amount_minor_units": 200000,
        "token_mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
        "merchant_wallet": "So1anaMerchantWallet1111111111111111111111111",
        "delivery_type": "REDIRECT",
        "delivery_value": "https://example.com/welcome",
        "membership_config": {
            "enabled": True,
            "platform": "CUSTOM",
            "identity_type": "WALLET",
            "identity_required": False,
            "renewal_mode": "MANUAL",
            "billing_interval_days": 30,
            "grace_period_days": 3,
        },
    }
)

print(product["id"], product["slug"])
```

Webhook endpoint management currently requires a dashboard session token, so the webhook resource uses the configured `bearer_token`.

## Build from source

```bash
cd packages/python-sdk
python setup.py sdist bdist_wheel
```


