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.1.0.tar.gz (3.9 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.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bila-0.1.0.tar.gz
Algorithm Hash digest
SHA256 25ba61e00b74bc79fab303618a01e7f429b74b0488f520f6e493d6e0b248b33b
MD5 4418f130f9d1546af1999a8620a772c2
BLAKE2b-256 39d47a14fbd0a4a6787baf5cb9b5ba2b6c697b63ace2647af5a3089a980dfe39

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bila-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 19943176033281c169eb33892858750600dd6c806804c842f00dd906470dcae1
MD5 7fe4c0f1e840711c384eb9dc411bc342
BLAKE2b-256 42ce2ccab3fc7ab6646e2eed16cd8a776e46bcbae45316ba1100126a03e6fc93

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