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

Uploaded Python 3

File details

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

File metadata

  • Download URL: linkbridge-0.2.0.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.2.0.tar.gz
Algorithm Hash digest
SHA256 84358af1adabf36285f5286c9d01cdc22cef8d3f113109493aca99c202fe5523
MD5 afc6ff92fbd970109e6c6f6e1d6ada8a
BLAKE2b-256 8a6fca0f2c340d7c27ae8a58c9cf76b92de7a812b0857aad60201e37ca64fa68

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for linkbridge-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 533b6c10a170f8a2b62afff3e2f723459bacc16920b5bd3a745c7fbefe144d77
MD5 85cac6bd457a5d24612ba7c8f2bb6aa5
BLAKE2b-256 ff270dd873768a81cd2c4c7e957d39a78c5d3531173c22b24f39390300f51d63

See more details on using hashes here.

Provenance

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

0.4.0

2 files

0.3.0

2 files

This release

0.2.0 This release

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