Metadata-Version: 2.1
Name: vepay-sdk
Version: 1.0.0
Summary: Official Python SDK for VePay's Shariah-compliant eCommerce invoice financing API
Home-page: https://vepay.io
Author: VePay Inc.
Author-email: hello@vepay.io
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown

# VePay Python SDK

Official Python client for **VePay** — Shariah-compliant instant financing and business funding for global eCommerce marketplace sellers.

[![PyPI version](https://img.shields.io/badge/pypi-v1.0.0-blue.svg)](https://pypi.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

---

## Features

- **Shariah-Compliant:** Flat service fees (1.0% - 2.0%). No interest rates, no hidden fees, and zero late compounding penalties.
- **Invoice Financing (Instapay):** Automate invoice drawing to advance up to 70% of store sales.
- **Store Eligibility Check:** Programmatically evaluate whether an eCommerce account qualifies for instant financing.
- **Fully Documented:** Complete Python type hinting and clear docstrings for IDE autocomplete.

---

## Installation

Install via pip:

```bash
pip install vepay-sdk
```

---

## Quickstart

Initialize the `VePayClient` using your api key generated in the VePay Seller Portal.

```python
from vepay import VePayClient

# Initialize Client
client = VePayClient(
    api_key="vp_live_abc123..."  # Replace with your actual key
)

try:
    # 1. Get Live Account Balance & Financing Limits
    balance = client.get_balance()
    print(f"Available Limit: {balance['availableLimit']} {balance['currency']}")
    print(f"Pending Outstanding: {balance['pendingRepayment']} {balance['currency']}")

    # 2. Draw 70% Advance on Store Invoice
    if balance["availableLimit"] > 1000:
        advance = client.request_advance(
            store_id="amzn_store_us_1029",
            amount=5000.00
        )
        print(f"Disbursement Initiated! ID: {advance['advanceId']}")
        print(f"Advanced Amount: {advance['advancedAmount']}")
        print(f"Flat Transaction Fee: {advance['serviceFee']} (No Interest)")

except Exception as e:
    print(f"API Error occurred: {e}")
```

---

## API Reference

### `VePayClient(api_key: str, base_url: str = "https://api.vepay.io/v1")`
Initializes the client object.

### `client.check_eligibility(platform: str, monthly_sales: float, currency: str, country: str)`
Evaluates platform sales metrics to determine credit capability.
```python
result = client.check_eligibility(
    platform="Amazon",
    monthly_sales=45000.00,
    currency="USD",
    country="US"
)
```

### `client.request_advance(store_id: str, amount: float)`
Initiates an invoice drawing request.
```python
result = client.request_advance(
    store_id="shopify_store_uk_7721",
    amount=2500.00
)
```

### `client.get_balance()`
Returns active limits and outstanding repayments.
```python
balance = client.get_balance()
```

---

## License

This project is licensed under the [MIT License](LICENSE).
