Package: killbills-sdk
KillBills - SDK (Python)The main purpose of this Software Development Kit (SDK) is to facilitates the integration of KillBills' services into Python applications. The SDK will act as an intermediary layer, allowing developers to communicate with the KillBills API and access its features in a straightforward manner. By providing a consistent and easy-to-use interface, the SDK aims to simplify & speed up the process of integrating KillBills' services into Python applications.DependanciesFeaturesgetStores : The method getStores returns a list of killbills integrated stores as an array of objects with relevant properties.sendTransaction : The method sendTransaction validates and send transaction to the killbills gate transaction.sendReceipt : The method sendReceipt validates and send a receipt to the killbills gate receipt.Installationwith pip :pipinstallkillbills-sdkUsage/ExamplesMethod getStores :importkillbills_sdkfromkillbills_sdk.getStoresimportget_storesprint(get_stores('dev','your-api-key'))Output:[{"id":"id","billing_descriptor":"storebillingdescriptor","store_name":"storename","merchant_name":"merchantname","full_address":"00street,00000,city","siret":00000000000000},{"id":"id","billing_descriptor":"storebillingdescriptor","store_name":"storename","merchant_name":"merchantname","full_address":"00street,00000,city","siret":00000000000000},//...other results]Method sendTransaction :note that the transactionData object only contains minimal required values see (insert link to all possibilities)importkillbills_sdkfromkillbills_sdk.sendTransactionimportsend_transactionpayload={...}print(send_transaction('dev',payload,'your-hmac-key'))Output:{"status":"success","message":"publishedtogatetransaction","messageId":"xxxxxxxxxxxxxxxxx","previewLink":"https://banks.killbills.co/payloads/xxxxxxxxxxxxxxxxx"}Method sendReceipt :note that the receiptData object only contains minimal required values see (insert link to all possibilities)fromsendReceiptimportsend_receiptreceiptData={...}print(send_receipt('prod',receiptData,'your-hmac-key'))Output:{"status":"success","message":"publishedtogatereceipt","messageId":"xxxxxxxxxxxxxxxxx","previewLink":"https://merchants.killbills.co/payloads/xxxxxxxxxxxxxxxxx"}Transaction & Receipt ArchitectureTRANSACTION :transactionData={bank_id:'',// string (36 caractères)callback_url:'',// stringpartner_name:'',// stringkb_features:[],// tableau de chaînes de caractères ou nombres videsreceipt_format:'',// string ('JSON', 'PDF', 'SVG', 'PNG')transaction:{reference_id:'',// stringamount:'',// number (positif)customer_id:'',// stringtransaction_date:'',// date (au format chaîne de caractères)store_name:'',// string ou videbilling_descriptor:'',// stringsiret:'',// string ou videpayment:'',// objet videcurrency:'',// string ou videpos_name:'',// string ou videmerchant_name:''// string ou vide}};RECEIPT :receiptData={reference_id:'',// string (alphanumérique)amount:0,// numbertotal_tax_amount:'',// number ou videcurrency:'',// string ('EUR' ou 'USD')date:'',// string (au format 'YYYY-MM-DDTHH:mm:ss')covers:0,// number ou videtable:'',// string ou videinvoice:0,// number ou videtotal_discount:0,// number ou videmode:0,// number ou videpartner_name:'',// stringmerchant:{merchant_name:'',// string ou videreference_id:'',// stringmerchant_id:0// number ou vide},store:{store_name:'',// stringreference_id:'',// stringbilling_descriptor:'',// stringsiret:'',// string (14 caractères)code_ape:'',// string ou videtva_intra:'',// string ou videaddress:{postal_code:0,// numberstreet_address:'',// string ou videcountry:'',// string ou videcity:'',// string ou videfull_address:'',// string ou videnumber:0// number ou vide}},taxes:[{description:'',// string ou videamount:0,// numberrate:550// number (550, 1000 ou 2000) ou vide}],items:[{reference_id:'',// string ou videname:'',// stringdescription:'',// string ou videtype:'',// string ou videquantity:0,// numberprice:0,// numberdiscount:0,// number ou videtotal_amount:0,// number ou videtax:{description:'',// string ou videamount:0,// numberrate:550// number (550, 1000 ou 2000) ou vide},subitems:[{reference_id:'',// string ou videname:'',// stringdescription:'',// string ou videquantity:0,// number ou videprice:0,// number ou vidediscount:0,// number ou videtotal_amount:0,// number ou videtax:{description:'',// string ou videamount:0,// numberrate:550// number (550, 1000 ou 2000) ou vide}}]}],payments:[{bin:'',// string ou videlast_four:'',// string ou videauth_code:'',// string ou videscheme:'',// string ou videamount:0,// numbertransaction_date:'',// string (au format 'YYYY-MM-DDTHH:mm:ss')transaction_id:'',// string ou videpayment_type:''// string ou vide}]};Run LocallyClone the projectgitclonehttps://github.com/killbillsdev/python-sdkGo to the project directorycdpython-sdkInstall dependenciesmakeinstallBuild projectmakebuildRunning TestsTo run tests, run the following commandmaketestFeedbackIf you have any feedback, please reach out to us at :https://freeonlinesurveys.com/s/8biYAZPaLicenseMIT