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": "Standard",
    # …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.1.2.tar.gz (12.7 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.1.2-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for linkbridge-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7c0aa16cb96b5bbcaaa5c92d953f807bf3a9dce6317126d9bf9ea30b93b42676
MD5 c79e015d36ab7d303ee39df8da80c62d
BLAKE2b-256 080318c5608438e91d546f3f03a20155f3109ef0cf0093e14beb7ea80d587294

See more details on using hashes here.

Provenance

The following attestation bundles were made for linkbridge-0.1.2.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.1.2-py3-none-any.whl.

File metadata

  • Download URL: linkbridge-0.1.2-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.12

File hashes

Hashes for linkbridge-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 528e27621b49d8a9c5f33f39aa035efb53dbf9259c518bf144e3e6845c1f8c2c
MD5 7a7f383527d15f8794d05cffd70e0a9c
BLAKE2b-256 00fed7afa07443c3ba14f22574ad58a2b6fdfc22bae2a52f8e72637d54bb4513

See more details on using hashes here.

Provenance

The following attestation bundles were made for linkbridge-0.1.2-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

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

This release

0.1.2 This release

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