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.1.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.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bila-0.2.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for bila-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d0a70248df5b06541fc55e86c9ddad9e98f8e6f4279b9650bc014f499627eec1
MD5 4e03a0d097269c89d5dd9b10dbb4a0f4
BLAKE2b-256 73cf595b370700a8965b8739cf47ac501ef00dbbc27fee17bd02320ea19f2cbc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bila-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for bila-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9dc5b8afecf427b93f3069196f25256236347d2b877e8060411a81fc0674a1eb
MD5 96411625766c86eb0ff4ff8624b1eef9
BLAKE2b-256 c829168dfc59d3dce774ee02d16504a3c579e95c91b40e836bd61aa37c96e047

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