Skip to main content

Official Bila Python SDK — Stripe-style payment aggregator for Somalia.

Project description

bila — Python SDK

Official Python SDK for Bila, the Stripe-style payment aggregator for Somalia.

pip install bila
from bila import Bila

bila = Bila(api_key="sk_live_...")

charge = bila.charges.create(
    amount=10000,
    currency="USD",
    rail="auto",
    identifier="+252611234567",
    description="Order #1234",
)

if charge["status"] == "requires_action":
    redirect_url = charge["requires_action_payload"]["redirect_to"]
    # send the payer to redirect_url

Webhook verification:

from bila import verify_webhook_signature

signature = request.headers["Bila-Signature"]
body = request.get_data().decode()
if not verify_webhook_signature(body, signature, secret="whsec_..."):
    return "invalid signature", 400

Full docs at https://bila.so/docs/sdks.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bila-0.2.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bila-0.2.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file bila-0.2.0.tar.gz.

File metadata

  • Download URL: bila-0.2.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for bila-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1b8dc81ab4a66710b46fe1b5075615b7f343e6c82fa81543190259a7fb861a18
MD5 eac6e58c2cefb1f751cd92eabd8b79ab
BLAKE2b-256 910413412c78a97f90851ace913b33fe04aba3dd87e907255dec0e16a28cc7e1

See more details on using hashes here.

File details

Details for the file bila-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: bila-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for bila-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab5c108ac34de147431f5cacb43a32d587318a895b23e786dde6c771d2068582
MD5 332e2c538a8c857e3bb5ff8867dcb393
BLAKE2b-256 3a7810e789fc2041ce08c951e75a42be1266bb760c01d63bd998c519509c0ad0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page