Skip to main content

linkbridge (Python SDK)

Official Python client for the Linkbridge e-invoicing API. Mirrors the surface of the Go and Node SDKs against the same OpenAPI contract (tools/openapi/openapi.yaml).

  • Zero runtime dependencies — uses only the Python standard library so the package drops cleanly into Lambda layers, vendored POS firmware, and air-gapped merchant ERPs.
  • Sync API with explicit OAuth2 client-credentials handling and automatic token refresh.
  • Webhook signature verification with constant-time comparison and the same 5-minute clock-skew window enforced server-side.

Install

pip install linkbridge

Requires Python 3.9 or newer.

Quickstart

from linkbridge import LinkbridgeClient

client = LinkbridgeClient(
    base_url="https://api.linkbridge.ng",
    client_id="your-client-id",
    client_secret="your-client-secret",
    scopes=["invoices:write", "invoices:read"],
)

accepted = client.invoices.submit({
    "irn": "INV001-SVC01-20260601",
    "invoice_kind": "B2B",
    # …rest of the canonical NRS payload — see
    # packages/schema/invoice.schema.json
})
print(accepted["irn"], accepted["status"])

# Read back, paginate, retry, mutate payment status:
record   = client.invoices.get(accepted["irn"])
page     = client.invoices.list(limit=20, status="failed")
requeued = client.invoices.transmit(accepted["irn"])
paid     = client.invoices.update_status(accepted["irn"],
              payment_status="PAID", reference="RCPT-001")

Webhook verification

from linkbridge import verify_webhook, SignatureError

@app.post("/hooks/linkbridge")
def hook(request):
    try:
        verify_webhook(
            secret=os.environ["WEBHOOK_SECRET"].encode(),
            body=request.body,                     # raw bytes off the wire
            header=request.headers["X-Linkbridge-Signature"],
        )
    except SignatureError:
        return 401
    # …handle the event

Errors

All non-2xx responses raise linkbridge.APIError, which exposes the HTTP status, the canonical error.code, the human error.message, and the trace_id so that operators can correlate against server logs.

Versioning

The package follows the same 0.MINOR.PATCH cadence as the API surface during the beta. Breaking changes will be confined to MINOR bumps until the API freezes at 1.0.0.

Download files

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

Source Distribution

linkbridge-0.4.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

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

linkbridge-0.4.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file linkbridge-0.4.0.tar.gz.

File metadata

  • Download URL: linkbridge-0.4.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for linkbridge-0.4.0.tar.gz
Algorithm Hash digest
SHA256 740f705cb2732ac3e937b8a9cda11eb0a1108c5ab4a742d0939823556df3986c
MD5 b76e58564d5b586249604bba67982c62
BLAKE2b-256 96f0cc56eef19a3ed9e512cf695b7978519696bce97b4efd4a1c76a32ff7925c

See more details on using hashes here.

Provenance

The following attestation bundles were made for linkbridge-0.4.0.tar.gz:

Publisher: sdk-release.yml on linkbridge-systems/linkbridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file linkbridge-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: linkbridge-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for linkbridge-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 389f0eec972fb18c9b6a32de5c36a73e894168ea5cbffa6c06ea07341bebe2b8
MD5 2fd95f75e79056635d750848d8dc9e23
BLAKE2b-256 7f1702075a83c25e86a5f83a1de9a6475bf2bec7f24529a6bbaa3c17bca56420

See more details on using hashes here.

Provenance

The following attestation bundles were made for linkbridge-0.4.0-py3-none-any.whl:

Publisher: sdk-release.yml on linkbridge-systems/linkbridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 files

0.3.0

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page