pip install easytransfert-sdk-api-marchand
from easytransfert import EasyTransfertSDK, SDKConfig
config = SDKConfig(
api_key="VOTRE_CLE_API",
ipn_url="https://votre-site.com/ipn"
)
sdk = EasyTransfertSDK(config)
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)
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)
balance_data = {
"wallet": "main"
}
response = sdk.balance.get_balance(balance_data)
print(response)
status_data = {
"transaction_id": "TRANS123"
}
response = sdk.transaction_status.check_status(status_data)
print(response)