Skip to main content

Installation

Initialization

You can also use the client as a context manager:

paybridgenp.checkout

checkout.create(params)

Creates a checkout session.
Parameters:

checkout.expire(id)

Marks a session as expired so it can no longer accept payment. Use this when you mint a fresh session for a logical purchase that already had one outstanding (e.g. a customer requesting a new payment link), so the old URL stops being payable immediately rather than waiting for its 30-minute TTL.
Idempotent: calling on an already-terminal session is a no-op that returns the current row state without error.

paybridgenp.payments

payments.list(**kwargs)

payments.retrieve(id)


paybridgenp.webhooks

webhooks.create(**kwargs)

webhooks.list()

webhooks.delete(id)

WebhooksResource.construct_event(body, signature, secret) (static)

Verifies a webhook signature and returns the parsed event. Use this in your webhook handler.
Raises SignatureVerificationError if:
  • The signature header is missing or malformed
  • The HMAC doesn’t match
  • The timestamp is more than 5 minutes old (replay attack protection)

paybridgenp.billing

The billing methods provide access to plans, customers, subscriptions, and invoices. Billing API access requires the Growth plan or higher.

Plans

Customers

Subscriptions

Invoices


Error handling

All SDK methods raise typed exceptions you can catch and inspect:

Exception classes


Type hints

The SDK ships with a py.typed marker and full type annotations. All parameter types are exported as TypedDict classes:

Framework examples