Installation
Initialization
$paybridgenp->checkout
checkout->create(array $params)
Creates a checkout session.
checkout->expire(string $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.
checkout->get(string $id)
Fetches a checkout session by ID: its current status, amount, customer, and any collected address. Read-only (sessions are created with checkout->create).
customerName, expiresAt, …), unlike the snake_case checkout->create response.
checkout->list(array $params = [])
Lists checkout sessions for the project, newest first.
$paybridgenp->paymentLinks
Reusable hosted payment pages. Methods need an API key with the links:read or links:write scope.
paymentLinks->create(array $params)
paymentLinks->list(array $params = [])
paymentLinks->get(string $id)
Returns the link plus aggregated view and conversion stats.
paymentLinks->update(string $id, array $params)
Updates editable fields. Only the keys you pass are changed.
paymentLinks->cancel(string $id)
Deactivates a link so it can no longer accept payments, while keeping it and its history for your records. The recommended way to retire a link that has already been used.
paymentLinks->delete(string $id)
Permanently deletes a link. Allowed only when the link has never been used. Otherwise it returns 422; cancel it instead.
$paybridgenp->payments
payments->list(array $params = [])
payments->get(string $id)
$paybridgenp->webhooks
webhooks->create(array $params)
webhooks->list()
webhooks->delete(string $id)
PayBridgeNP::constructEvent(string $body, string $signature, string $secret) (static)
Verifies a webhook signature and returns the parsed event. Use this in your webhook handler.
SignatureVerificationException 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 throw typed exceptions you can catch and inspect:Exception classes
Framework examples
Laravel
Laravel