> ## Documentation Index
> Fetch the complete documentation index at: https://apidoc-business.easytransfert.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Python

## Installation

Le SDK Python peut être installé via [pip](https://pypi.org/project/easytransfert-sdk-api-marchand/1.0.0/)

```python theme={null}
pip install easytransfert-sdk-api-marchand
```

## Initialisation

```python theme={null}
from easytransfert import EasyTransfertSDK, SDKConfig

config = SDKConfig(
    api_key="VOTRE_CLE_API",
    ipn_url="https://votre-site.com/ipn"
)

sdk = EasyTransfertSDK(config)
```

## Collecte (Cash-out)

```python theme={null}
cashout_data = {
   "amount": 1000,
   "destination": "0102030405",
   "ipn_url": "https://votre-domaine.com/webhook/ipn",
   "api_key": "votre-api-key",
   "service_id": 17,
   "custom_data": "commande-12345",
}
response = sdk.cashout.cashout(cashin_data)
print(response)
```

## Transfert (Cash-in)

```python theme={null}
cashin_data = {
    "amount": 1000,
    "destination": "0700000000",
    "ipn_url": "https://votre-domaine.com/webhook/ipn",
    "api_key": "votre-api-key",
    "service_id": 17,
}
response = sdk.cashin.cashin(cashin_data)
print(response)
```

## Vérifier le solde

```python theme={null}
balance_data = {
    "wallet": "main"
}
response = sdk.balance.get_balance(balance_data)
print(response)
```

## Vérifier le status d'une transaction

```python theme={null}
status_data = {
    "transaction_id": "TRANS123"
}
response = sdk.transaction_status.check_status(status_data)
print(response)
```
