
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
python-killbill-client
Advanced tools
pip install python-killbill-client
Frist step create client
from killbill import KillBillClient
killbill = KillBillClient("admin", "password")
Table of contents :
killbill.tenant.create(api_key="bob", api_secret="lazar", created_by="demo")
And use api_key
and api_secret
to create header
from killbill import Header
header = Header(api_key="bob", api_secret="lazar", created_by="demo")
from killbill.enums import ProductCategory, BillingPeriod, TrialTimeUnit
killbill.catalog.add_simple_plan(
header=header, # pass header
plan_id="standard-monthly",
product_name="Standard",
product_category=ProductCategory.BASE,
currency="USD",
amount=24.95,
billing_period=BillingPeriod.MONTHLY,
trial_length=0,
trial_time_unit=TrialTimeUnit.UNLIMITED,
)
# first get text content
xml_file = open("SpyCarBasic.xml", "r", encoding="utf-8").read()
killbill.catalog.create(header=header, catalog_xml=xml_file)
# return account id
account_id = killbill.account.create(
header=header,
name="Customer 1",
first_name_length=10,
)
import json
accounts = killbill.account.list(header=header)
print(json.dumps(accounts, indent=4))
Note: Replace 3d52ce98-104e-4cfe-af7d-732f9a264a9a
below with the ID of your account.
killbill.account.add_payment_method(
header=header,
account_id="3d52ce98-104e-4cfe-af7d-732f9a264a9a",
plugin_name="__EXTERNAL_PAYMENT__",
is_default=True,
)
Note: Replace 3d52ce98-104e-4cfe-af7d-732f9a264a9a
below with the ID of your account.
subscription_id = killbill.subscription.create(
header=header,
account_id="3d52ce98-104e-4cfe-af7d-732f9a264a9a",
plan_name="standard-monthly",
)
Note: Replace 3d52ce98-104e-4cfe-af7d-732f9a264a9a
below with the ID of your account.
bundle_id = killbill.subscription.create_with_add_ons(
header=header,
account_id="3d52ce98-104e-4cfe-af7d-732f9a264a9a",
plan_name="standard-monthly",
add_ons_name=["standard-monthly-add-on"],
)
Note: Replace 3d52ce98-104e-4cfe-af7d-732f9a264a9a
below with the ID of your account.
killbill.subscription.create_multiple_with_add_ons(
header,
account_id="3d52ce98-104e-4cfe-af7d-732f9a264a9a",
bundles=[
["standard-monthly", "standard-monthly-add-on"],
["sport-monthly", "sport-monthly-add-on-1", "sport-monthly-add-on-2"],
],
)
Note: Replace 3d52ce98-104e-4cfe-af7d-732f9a264a9a
below with the ID of your account.
invoices = killbill.account.invoices(
header=header, account_id="3d52ce98-104e-4cfe-af7d-732f9a264a9a"
)
print(json.dumps(invoices, indent=4))
overdue_config = killbill.overdue.retrieve(header=header)
print(overdue_config)
# first get text content
overdue_config_xml = open("Overdue.xml", "r", encoding="utf-8").read()
killbill.overdue.upload(header=header, overdue_config_xml=overdue_config_xml)
FAQs
killbill client
We found that python-killbill-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.