LedgerBee Developer
  • Getting started
  • Conventions
  • Products
  • API Reference
Information
Accounts
    List accountsget
API Key
    Get current API keyget
Company
    Get company detailsget
Customers
    List customersgetCreate a customerpostGet a single customergetUpdate a customerpatchList a customer's contactsgetList a customer's departmentsgetList customer groupsget
Dimensions
    List all dimensionsgetCreate a new dimension categorypostGet a single dimension by IDgetUpdate a dimension categoryputDelete a dimension categorydeleteCreate a new dimension valuepostUpdate a dimension valueputDelete a dimension valuedelete
Document Templates
    List document templatesget
Journal Categories
    List journal categoriesget
Journal Entries
    Create multiple journal entries in batch (DEPRECATED — migrate to v2)postList journal entriesgetCreate a single journal entry (DEPRECATED — use POST /api/v2/journal-entries)postGet a single journal entrygetUpdate a journal entry — correct the reference and/or set your external system idpatchGet attachments for a journal entrygetReverse posted journal entries in batchpostReverse a posted journal entrypost
MCP
    LedgerBee Developer MCP Serverpost
Meters
    List meter subscriptions by IDgetReport usagepostList meter subscriptions by nameget
Product Groups
    List product groupsgetCreate a product grouppostGet a product groupgetDelete a product groupdeleteUpdate a product grouppatch
Product Prices
    Create a product pricepostGet a product pricegetDelete a product pricedeleteUpdate a product pricepatchActivate a product pricepostArchive a product pricepostDisable a product pricepostSet a price as the product defaultpost
Products
    List productsgetCreate a productpostGet a productgetDelete a productdeleteUpdate a productpatch
Projects
    List all projectsgetIdempotent project upsertputCreate a projectpostGet a projectgetUpdate a projectputGet project profitgetAdd a subprojectpostUpdate a subprojectputDelete a subprojectdelete
Subscriptions
    List customer subscriptionsgetAssign a subscription to a customerpostGet a customer subscription by its stable idgetUpdate a customer subscriptionpatchList a subscription’s pending scheduled changesgetCancel a single pending scheduled changedeleteCancel a customer subscriptionpostList subscription plansgetArchive a subscription planpost
VAT Codes
    List VAT codesget
Webhook Endpoints
    List webhook endpointsgetCreate a webhook endpointpostRetrieve a webhook endpointgetUpdate a webhook endpointputDelete a webhook endpointdeleteRoll the signing secretpostSend a test eventpost
Portal SSO
    Published RP signing keys (JWKS) for a tenant's private_key_jwt SSOgetMint a customer-portal SSO handoff referencepostProvision a customer + grant portal access (partner JIT provisioning)postRevoke (force-refresh) a user's customer-portal sessionspost
Credit Notes
    List credit notesgetCreate a credit notepostGet a credit note by IDgetGet the delivery status of a credit notegetDownload the credit note PDFgetSend a credit note to the customerpost
Payment Methods
    List saved payment methods for a customergetApply a payment method to all active subscriptions for a customerpostCancel a saved card on the payment providerdeleteUnassign a payment method from a customerdeleteGenerate a link for the customer to save a card for future paymentspostSet a saved payment method as the customer defaultput
Draft Journal Entries
    Create multiple draft journal entries in batchpostList draft journal entriesgetCreate a draft journal entrypostGet a single draft journal entrygetDelete a draft journal entrydeleteBook a draft journal entrypost
Invoices
    List invoicesgetCreate a draft invoicepostGet an invoice by IDgetGet the delivery status of an invoicegetDownload the invoice PDFgetSend an invoice to the customerpost
Order Confirmations
    List order confirmationsgetCreate a draft order confirmationpostGet an order confirmation by idgetUpdate a draft order confirmationpatchConvert an order confirmation into an invoicepostDownload an order confirmation as PDFgetSend an order confirmationpost
Portal Plans
    List the full plan cataloguegetGet one plan by idgetResolve the gated pricing catalogue for an identified buyer (partner display)post
Quotes
    List quotesgetCreate a draft quotepostGet a quote by idgetUpdate a draft quotepatchConvert a quotepostDownload a quote as PDFgetSend a quotepost
Vendors
    List vendorsgetCreate a vendorpostList vendor contactsgetList vendor departmentsgetList vendor groupsget
Draft Journal Entries (v2)
    Create draft journal entries in batch (v2)postList draft journal entries (v2)getCreate a draft journal entry (v2)postGet a single draft journal entry (v2)getDelete a draft journal entry (v2)deleteUpdate a draft journal entry (v2)patchBook a draft journal entry (v2)post
Journal Entries (v2)
    Create a journal entry (v2)postCreate journal entries in batch (v2)post
Schemas
LedgerBee Public API
LedgerBee Public API

Webhook Endpoints

Download schema

Register HTTPS endpoints to receive signed event notifications. Each delivery is signed following the Standard Webhooks specification — verify the webhook-id, webhook-timestamp, and webhook-signature headers against the endpoint secret (returned once on create / roll-secret) using one of the spec’s drop-in verification libraries instead of implementing the HMAC-SHA256 check yourself.


List webhook endpoints

GET
https://api.ledgerbee.com/api
/v1/webhook-endpoints
x-api-key (header)
or
OAuth 2.0

Returns the company’s webhook endpoints, newest first.

List webhook endpoints › query Parameters

page
​number

Page number (1-based).

Example: 1
Default: 1
limit
​number

Page size (max 100).

Example: 25
Default: 25

List webhook endpoints › Responses

Paginated list of webhook endpoints.

WebhookEndpointList
​WebhookEndpoint[] · required
total
​number · required

Total number of endpoints matching the query.

Example: 3
page
​number · required

Current page (1-based).

Example: 1
pageSize
​number · required

Page size.

Example: 25
GET/v1/webhook-endpoints
curl https://api.ledgerbee.com/api/v1/webhook-endpoints \ --header 'x-api-key: <api-key>'
Example Responses
{ "data": [ { "id": "0192f3a1-...", "url": "https://example.com/webhooks/ledgerbee", "enabledEvents": [ "subscription.assigned" ], "status": "enabled", "description": "Production billing sync", "createdAt": "2026-05-29T10:00:00.000Z", "updatedAt": "2026-05-29T10:00:00.000Z" } ], "total": 3, "page": 1, "pageSize": 25 }
json
application/json

Create a webhook endpoint

POST
https://api.ledgerbee.com/api
/v1/webhook-endpoints
x-api-key (header)
or
OAuth 2.0

Registers a new endpoint. url must be a public HTTPS URL. The response includes the signing secret exactly once — store it securely.

Create a webhook endpoint › Request Body

CreateWebhookEndpointRequest
url
​string · required

The HTTPS URL events are delivered to. Must be a public https URL (loopback/private/link-local hosts are rejected).

Example: https://example.com/webhooks/ledgerbee
enabledEvents
​string[] · required

The events to subscribe to. Must contain at least one known event type.

Available events:

  • subscription.assigned — Fired when a subscription is assigned to a customer (may be future-dated / upcoming).
  • subscription.started — Fired when a subscription becomes active — grant entitlement/access on this event, not on assigned.
  • subscription.updated — Fired when a config property changes without a structural transition (e.g. name, payment method, billing direction).
  • subscription.transitioned — Fired on a structural change: plan replace, product edit, billing cadence change, or realign.
  • subscription.paused — Fired when a subscription is paused.
  • subscription.resumed — Fired when a subscription resumes from a pause.
  • subscription.trial_ended — Fired when a subscription trial ends and normal billing begins (the sub stays active).
  • subscription.cancellation_scheduled — Fired when a future cancellation is scheduled for a subscription (still active until then).
  • subscription.cancellation_cleared — Fired when a previously scheduled cancellation is cleared.
  • subscription.churned — Fired when a subscription is cancelled/finalized — revoke entitlement on this event.
  • subscription.billed — Fired once per (child) subscription when a billing run produces its invoice.
  • subscription.payment_succeeded — Fired when a card charge for the subscription clears — the success pair of the charge_failed error signal.
  • subscription.error — Fired when a delivery/processing problem occurs for a subscription (e.g. undeliverable recipient).
  • billing.invoice_sent — Fired when an invoice document is sent to the customer.
  • billing.credit_note_sent — Fired when a credit note document is sent to the customer.
  • customer.created — Fired when a customer is created (payload flags whether it was a portal self-signup).
  • card.added — Fired when a card is successfully saved for a customer (provider-opaque).
  • card.removed — Fired when a saved card is removed in-app or cancelled at the provider.
  • card.updated — Fired when a saved card’s details change (network auto-update or refresh).
  • card.expiring — Fired when a saved card is approaching expiry.
  • card.expired — Fired when a saved card is observed to have expired.
  • card.default_changed — Fired when the customer’s default card changes (explicit or auto-default).
  • card.backup_changed — Fired when the customer’s designated backup card is set, replaced, or cleared.
  • card.add_failed — Fired when a card-save attempt fails (decline or authentication failure).
  • quote.sent — Fired when a quote is sent to the customer.
  • quote.converted — Fired when a quote is converted into an order confirmation or an invoice.
  • order_confirmation.sent — Fired when an order confirmation is sent to the customer.
  • order_confirmation.converted — Fired when an order confirmation is converted into an invoice.
  • project.created — Fired when a project is created (payload carries the owned dimension id for correlation with the dimensions API).
  • project.updated — Fired when a project's fields are updated (payload lists the changed field names). Also fires on un-archive.
  • project.archived — Fired when a project is archived (its dimension is deactivated; postings history is preserved).
Enum values:
subscription.assigned
subscription.started
subscription.updated
subscription.transitioned
subscription.paused
subscription.resumed
subscription.trial_ended
subscription.cancellation_scheduled
Example: ["subscription.assigned"]
description
​string · maxLength: 512

Optional human-facing description.

Example: Production billing sync

Create a webhook endpoint › Responses

Endpoint created. Includes the one-time signing secret.

WebhookEndpointWithSecret
id
​string · required

Unique identifier of the webhook endpoint.

Example: 0192f3a1-...
url
​string · required

The HTTPS URL events are delivered to.

Example: https://example.com/webhooks/ledgerbee
enabledEvents
​string[] · required

The events this endpoint is subscribed to. An event is delivered to every enabled endpoint subscribed to its type.

Available events:

  • subscription.assigned — Fired when a subscription is assigned to a customer (may be future-dated / upcoming).
  • subscription.started — Fired when a subscription becomes active — grant entitlement/access on this event, not on assigned.
  • subscription.updated — Fired when a config property changes without a structural transition (e.g. name, payment method, billing direction).
  • subscription.transitioned — Fired on a structural change: plan replace, product edit, billing cadence change, or realign.
  • subscription.paused — Fired when a subscription is paused.
  • subscription.resumed — Fired when a subscription resumes from a pause.
  • subscription.trial_ended — Fired when a subscription trial ends and normal billing begins (the sub stays active).
  • subscription.cancellation_scheduled — Fired when a future cancellation is scheduled for a subscription (still active until then).
  • subscription.cancellation_cleared — Fired when a previously scheduled cancellation is cleared.
  • subscription.churned — Fired when a subscription is cancelled/finalized — revoke entitlement on this event.
  • subscription.billed — Fired once per (child) subscription when a billing run produces its invoice.
  • subscription.payment_succeeded — Fired when a card charge for the subscription clears — the success pair of the charge_failed error signal.
  • subscription.error — Fired when a delivery/processing problem occurs for a subscription (e.g. undeliverable recipient).
  • billing.invoice_sent — Fired when an invoice document is sent to the customer.
  • billing.credit_note_sent — Fired when a credit note document is sent to the customer.
  • customer.created — Fired when a customer is created (payload flags whether it was a portal self-signup).
  • card.added — Fired when a card is successfully saved for a customer (provider-opaque).
  • card.removed — Fired when a saved card is removed in-app or cancelled at the provider.
  • card.updated — Fired when a saved card’s details change (network auto-update or refresh).
  • card.expiring — Fired when a saved card is approaching expiry.
  • card.expired — Fired when a saved card is observed to have expired.
  • card.default_changed — Fired when the customer’s default card changes (explicit or auto-default).
  • card.backup_changed — Fired when the customer’s designated backup card is set, replaced, or cleared.
  • card.add_failed — Fired when a card-save attempt fails (decline or authentication failure).
  • quote.sent — Fired when a quote is sent to the customer.
  • quote.converted — Fired when a quote is converted into an order confirmation or an invoice.
  • order_confirmation.sent — Fired when an order confirmation is sent to the customer.
  • order_confirmation.converted — Fired when an order confirmation is converted into an invoice.
  • project.created — Fired when a project is created (payload carries the owned dimension id for correlation with the dimensions API).
  • project.updated — Fired when a project's fields are updated (payload lists the changed field names). Also fires on un-archive.
  • project.archived — Fired when a project is archived (its dimension is deactivated; postings history is preserved).
Enum values:
subscription.assigned
subscription.started
subscription.updated
subscription.transitioned
subscription.paused
subscription.resumed
subscription.trial_ended
subscription.cancellation_scheduled
Example: ["subscription.assigned"]
status
​string · enum · required

Delivery status. disabled endpoints are retained but receive no events.

Enum values:
enabled
disabled
Example: enabled
createdAt
​string · required

ISO 8601 creation timestamp.

Example: 2026-05-29T10:00:00.000Z
updatedAt
​string · required

ISO 8601 last-update timestamp.

Example: 2026-05-29T10:00:00.000Z
secret
​string · required

The signing secret (shown only on create and roll-secret). Used to verify the webhook-signature header.

Example: whsec_...
description
​string | null

Optional human-facing description of what this endpoint is used for.

Example: Production billing sync
POST/v1/webhook-endpoints
curl https://api.ledgerbee.com/api/v1/webhook-endpoints \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "url": "https://example.com/webhooks/ledgerbee", "enabledEvents": [ "subscription.assigned" ], "description": "Production billing sync" }'
Example Request Body
{ "url": "https://example.com/webhooks/ledgerbee", "enabledEvents": [ "subscription.assigned" ], "description": "Production billing sync" }
json
Example Responses
{ "id": "0192f3a1-...", "url": "https://example.com/webhooks/ledgerbee", "enabledEvents": [ "subscription.assigned" ], "status": "enabled", "description": "Production billing sync", "createdAt": "2026-05-29T10:00:00.000Z", "updatedAt": "2026-05-29T10:00:00.000Z", "secret": "whsec_..." }
json
application/json

Retrieve a webhook endpoint

GET
https://api.ledgerbee.com/api
/v1/webhook-endpoints/{id}
x-api-key (header)
or
OAuth 2.0

Retrieves a single webhook endpoint configuration by its id. Returns 404 with code WEBHOOK_ENDPOINT_NOT_FOUND when the endpoint does not exist in your company.

Required Scope

  • webhook-endpoints-read

Retrieve a webhook endpoint › path Parameters

id
​string · required

The webhook endpoint id.

Retrieve a webhook endpoint › Responses

The webhook endpoint.

WebhookEndpoint
id
​string · required

Unique identifier of the webhook endpoint.

Example: 0192f3a1-...
url
​string · required

The HTTPS URL events are delivered to.

Example: https://example.com/webhooks/ledgerbee
enabledEvents
​string[] · required

The events this endpoint is subscribed to. An event is delivered to every enabled endpoint subscribed to its type.

Available events:

  • subscription.assigned — Fired when a subscription is assigned to a customer (may be future-dated / upcoming).
  • subscription.started — Fired when a subscription becomes active — grant entitlement/access on this event, not on assigned.
  • subscription.updated — Fired when a config property changes without a structural transition (e.g. name, payment method, billing direction).
  • subscription.transitioned — Fired on a structural change: plan replace, product edit, billing cadence change, or realign.
  • subscription.paused — Fired when a subscription is paused.
  • subscription.resumed — Fired when a subscription resumes from a pause.
  • subscription.trial_ended — Fired when a subscription trial ends and normal billing begins (the sub stays active).
  • subscription.cancellation_scheduled — Fired when a future cancellation is scheduled for a subscription (still active until then).
  • subscription.cancellation_cleared — Fired when a previously scheduled cancellation is cleared.
  • subscription.churned — Fired when a subscription is cancelled/finalized — revoke entitlement on this event.
  • subscription.billed — Fired once per (child) subscription when a billing run produces its invoice.
  • subscription.payment_succeeded — Fired when a card charge for the subscription clears — the success pair of the charge_failed error signal.
  • subscription.error — Fired when a delivery/processing problem occurs for a subscription (e.g. undeliverable recipient).
  • billing.invoice_sent — Fired when an invoice document is sent to the customer.
  • billing.credit_note_sent — Fired when a credit note document is sent to the customer.
  • customer.created — Fired when a customer is created (payload flags whether it was a portal self-signup).
  • card.added — Fired when a card is successfully saved for a customer (provider-opaque).
  • card.removed — Fired when a saved card is removed in-app or cancelled at the provider.
  • card.updated — Fired when a saved card’s details change (network auto-update or refresh).
  • card.expiring — Fired when a saved card is approaching expiry.
  • card.expired — Fired when a saved card is observed to have expired.
  • card.default_changed — Fired when the customer’s default card changes (explicit or auto-default).
  • card.backup_changed — Fired when the customer’s designated backup card is set, replaced, or cleared.
  • card.add_failed — Fired when a card-save attempt fails (decline or authentication failure).
  • quote.sent — Fired when a quote is sent to the customer.
  • quote.converted — Fired when a quote is converted into an order confirmation or an invoice.
  • order_confirmation.sent — Fired when an order confirmation is sent to the customer.
  • order_confirmation.converted — Fired when an order confirmation is converted into an invoice.
  • project.created — Fired when a project is created (payload carries the owned dimension id for correlation with the dimensions API).
  • project.updated — Fired when a project's fields are updated (payload lists the changed field names). Also fires on un-archive.
  • project.archived — Fired when a project is archived (its dimension is deactivated; postings history is preserved).
Enum values:
subscription.assigned
subscription.started
subscription.updated
subscription.transitioned
subscription.paused
subscription.resumed
subscription.trial_ended
subscription.cancellation_scheduled
Example: ["subscription.assigned"]
status
​string · enum · required

Delivery status. disabled endpoints are retained but receive no events.

Enum values:
enabled
disabled
Example: enabled
createdAt
​string · required

ISO 8601 creation timestamp.

Example: 2026-05-29T10:00:00.000Z
updatedAt
​string · required

ISO 8601 last-update timestamp.

Example: 2026-05-29T10:00:00.000Z
description
​string | null

Optional human-facing description of what this endpoint is used for.

Example: Production billing sync
GET/v1/webhook-endpoints/{id}
curl https://api.ledgerbee.com/api/v1/webhook-endpoints/:id \ --header 'x-api-key: <api-key>'
Example Responses
{ "id": "0192f3a1-...", "url": "https://example.com/webhooks/ledgerbee", "enabledEvents": [ "subscription.assigned" ], "status": "enabled", "description": "Production billing sync", "createdAt": "2026-05-29T10:00:00.000Z", "updatedAt": "2026-05-29T10:00:00.000Z" }
json
application/json

Update a webhook endpoint

PUT
https://api.ledgerbee.com/api
/v1/webhook-endpoints/{id}
x-api-key (header)
or
OAuth 2.0

All fields optional. enabledEvents replaces the full subscription set. Send description: null to clear it.

Update a webhook endpoint › path Parameters

id
​string · required

The webhook endpoint id.

Update a webhook endpoint › Request Body

UpdateWebhookEndpointRequest
url
​string

New HTTPS delivery URL.

Example: https://example.com/webhooks/v2
enabledEvents
​string[]

Replace the full set of subscribed events.

Available events:

  • subscription.assigned — Fired when a subscription is assigned to a customer (may be future-dated / upcoming).
  • subscription.started — Fired when a subscription becomes active — grant entitlement/access on this event, not on assigned.
  • subscription.updated — Fired when a config property changes without a structural transition (e.g. name, payment method, billing direction).
  • subscription.transitioned — Fired on a structural change: plan replace, product edit, billing cadence change, or realign.
  • subscription.paused — Fired when a subscription is paused.
  • subscription.resumed — Fired when a subscription resumes from a pause.
  • subscription.trial_ended — Fired when a subscription trial ends and normal billing begins (the sub stays active).
  • subscription.cancellation_scheduled — Fired when a future cancellation is scheduled for a subscription (still active until then).
  • subscription.cancellation_cleared — Fired when a previously scheduled cancellation is cleared.
  • subscription.churned — Fired when a subscription is cancelled/finalized — revoke entitlement on this event.
  • subscription.billed — Fired once per (child) subscription when a billing run produces its invoice.
  • subscription.payment_succeeded — Fired when a card charge for the subscription clears — the success pair of the charge_failed error signal.
  • subscription.error — Fired when a delivery/processing problem occurs for a subscription (e.g. undeliverable recipient).
  • billing.invoice_sent — Fired when an invoice document is sent to the customer.
  • billing.credit_note_sent — Fired when a credit note document is sent to the customer.
  • customer.created — Fired when a customer is created (payload flags whether it was a portal self-signup).
  • card.added — Fired when a card is successfully saved for a customer (provider-opaque).
  • card.removed — Fired when a saved card is removed in-app or cancelled at the provider.
  • card.updated — Fired when a saved card’s details change (network auto-update or refresh).
  • card.expiring — Fired when a saved card is approaching expiry.
  • card.expired — Fired when a saved card is observed to have expired.
  • card.default_changed — Fired when the customer’s default card changes (explicit or auto-default).
  • card.backup_changed — Fired when the customer’s designated backup card is set, replaced, or cleared.
  • card.add_failed — Fired when a card-save attempt fails (decline or authentication failure).
  • quote.sent — Fired when a quote is sent to the customer.
  • quote.converted — Fired when a quote is converted into an order confirmation or an invoice.
  • order_confirmation.sent — Fired when an order confirmation is sent to the customer.
  • order_confirmation.converted — Fired when an order confirmation is converted into an invoice.
  • project.created — Fired when a project is created (payload carries the owned dimension id for correlation with the dimensions API).
  • project.updated — Fired when a project's fields are updated (payload lists the changed field names). Also fires on un-archive.
  • project.archived — Fired when a project is archived (its dimension is deactivated; postings history is preserved).
Enum values:
subscription.assigned
subscription.started
subscription.updated
subscription.transitioned
subscription.paused
subscription.resumed
subscription.trial_ended
subscription.cancellation_scheduled
Example: ["subscription.assigned"]
status
​string · enum

Enable or disable delivery without deleting the endpoint.

Enum values:
enabled
disabled
description
​string | null · maxLength: 512

Update the description. Send null to clear it.

Example: Updated description

Update a webhook endpoint › Responses

The updated webhook endpoint.

WebhookEndpoint
id
​string · required

Unique identifier of the webhook endpoint.

Example: 0192f3a1-...
url
​string · required

The HTTPS URL events are delivered to.

Example: https://example.com/webhooks/ledgerbee
enabledEvents
​string[] · required

The events this endpoint is subscribed to. An event is delivered to every enabled endpoint subscribed to its type.

Available events:

  • subscription.assigned — Fired when a subscription is assigned to a customer (may be future-dated / upcoming).
  • subscription.started — Fired when a subscription becomes active — grant entitlement/access on this event, not on assigned.
  • subscription.updated — Fired when a config property changes without a structural transition (e.g. name, payment method, billing direction).
  • subscription.transitioned — Fired on a structural change: plan replace, product edit, billing cadence change, or realign.
  • subscription.paused — Fired when a subscription is paused.
  • subscription.resumed — Fired when a subscription resumes from a pause.
  • subscription.trial_ended — Fired when a subscription trial ends and normal billing begins (the sub stays active).
  • subscription.cancellation_scheduled — Fired when a future cancellation is scheduled for a subscription (still active until then).
  • subscription.cancellation_cleared — Fired when a previously scheduled cancellation is cleared.
  • subscription.churned — Fired when a subscription is cancelled/finalized — revoke entitlement on this event.
  • subscription.billed — Fired once per (child) subscription when a billing run produces its invoice.
  • subscription.payment_succeeded — Fired when a card charge for the subscription clears — the success pair of the charge_failed error signal.
  • subscription.error — Fired when a delivery/processing problem occurs for a subscription (e.g. undeliverable recipient).
  • billing.invoice_sent — Fired when an invoice document is sent to the customer.
  • billing.credit_note_sent — Fired when a credit note document is sent to the customer.
  • customer.created — Fired when a customer is created (payload flags whether it was a portal self-signup).
  • card.added — Fired when a card is successfully saved for a customer (provider-opaque).
  • card.removed — Fired when a saved card is removed in-app or cancelled at the provider.
  • card.updated — Fired when a saved card’s details change (network auto-update or refresh).
  • card.expiring — Fired when a saved card is approaching expiry.
  • card.expired — Fired when a saved card is observed to have expired.
  • card.default_changed — Fired when the customer’s default card changes (explicit or auto-default).
  • card.backup_changed — Fired when the customer’s designated backup card is set, replaced, or cleared.
  • card.add_failed — Fired when a card-save attempt fails (decline or authentication failure).
  • quote.sent — Fired when a quote is sent to the customer.
  • quote.converted — Fired when a quote is converted into an order confirmation or an invoice.
  • order_confirmation.sent — Fired when an order confirmation is sent to the customer.
  • order_confirmation.converted — Fired when an order confirmation is converted into an invoice.
  • project.created — Fired when a project is created (payload carries the owned dimension id for correlation with the dimensions API).
  • project.updated — Fired when a project's fields are updated (payload lists the changed field names). Also fires on un-archive.
  • project.archived — Fired when a project is archived (its dimension is deactivated; postings history is preserved).
Enum values:
subscription.assigned
subscription.started
subscription.updated
subscription.transitioned
subscription.paused
subscription.resumed
subscription.trial_ended
subscription.cancellation_scheduled
Example: ["subscription.assigned"]
status
​string · enum · required

Delivery status. disabled endpoints are retained but receive no events.

Enum values:
enabled
disabled
Example: enabled
createdAt
​string · required

ISO 8601 creation timestamp.

Example: 2026-05-29T10:00:00.000Z
updatedAt
​string · required

ISO 8601 last-update timestamp.

Example: 2026-05-29T10:00:00.000Z
description
​string | null

Optional human-facing description of what this endpoint is used for.

Example: Production billing sync
PUT/v1/webhook-endpoints/{id}
curl https://api.ledgerbee.com/api/v1/webhook-endpoints/:id \ --request PUT \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "url": "https://example.com/webhooks/v2", "enabledEvents": [ "subscription.assigned" ], "status": "enabled", "description": "Updated description" }'
Example Request Body
{ "url": "https://example.com/webhooks/v2", "enabledEvents": [ "subscription.assigned" ], "status": "enabled", "description": "Updated description" }
json
Example Responses
{ "id": "0192f3a1-...", "url": "https://example.com/webhooks/ledgerbee", "enabledEvents": [ "subscription.assigned" ], "status": "enabled", "description": "Production billing sync", "createdAt": "2026-05-29T10:00:00.000Z", "updatedAt": "2026-05-29T10:00:00.000Z" }
json
application/json

Delete a webhook endpoint

DELETE
https://api.ledgerbee.com/api
/v1/webhook-endpoints/{id}
x-api-key (header)
or
OAuth 2.0

Permanently removes the endpoint and its delivery log.

Delete a webhook endpoint › path Parameters

id
​string · required

The webhook endpoint id.

Delete a webhook endpoint › Responses

Endpoint deleted.

No data returned
DELETE/v1/webhook-endpoints/{id}
curl https://api.ledgerbee.com/api/v1/webhook-endpoints/:id \ --request DELETE \ --header 'x-api-key: <api-key>'
Example Responses
No example specified for this content type

Roll the signing secret

POST
https://api.ledgerbee.com/api
/v1/webhook-endpoints/{id}/roll-secret
x-api-key (header)
or
OAuth 2.0

Generates a new signing secret for the endpoint, returned once. The endpoint id is unchanged. The previous secret stops verifying immediately.

Roll the signing secret › path Parameters

id
​string · required

The webhook endpoint id.

Roll the signing secret › Responses

The endpoint with its new one-time signing secret.

WebhookEndpointWithSecret
id
​string · required

Unique identifier of the webhook endpoint.

Example: 0192f3a1-...
url
​string · required

The HTTPS URL events are delivered to.

Example: https://example.com/webhooks/ledgerbee
enabledEvents
​string[] · required

The events this endpoint is subscribed to. An event is delivered to every enabled endpoint subscribed to its type.

Available events:

  • subscription.assigned — Fired when a subscription is assigned to a customer (may be future-dated / upcoming).
  • subscription.started — Fired when a subscription becomes active — grant entitlement/access on this event, not on assigned.
  • subscription.updated — Fired when a config property changes without a structural transition (e.g. name, payment method, billing direction).
  • subscription.transitioned — Fired on a structural change: plan replace, product edit, billing cadence change, or realign.
  • subscription.paused — Fired when a subscription is paused.
  • subscription.resumed — Fired when a subscription resumes from a pause.
  • subscription.trial_ended — Fired when a subscription trial ends and normal billing begins (the sub stays active).
  • subscription.cancellation_scheduled — Fired when a future cancellation is scheduled for a subscription (still active until then).
  • subscription.cancellation_cleared — Fired when a previously scheduled cancellation is cleared.
  • subscription.churned — Fired when a subscription is cancelled/finalized — revoke entitlement on this event.
  • subscription.billed — Fired once per (child) subscription when a billing run produces its invoice.
  • subscription.payment_succeeded — Fired when a card charge for the subscription clears — the success pair of the charge_failed error signal.
  • subscription.error — Fired when a delivery/processing problem occurs for a subscription (e.g. undeliverable recipient).
  • billing.invoice_sent — Fired when an invoice document is sent to the customer.
  • billing.credit_note_sent — Fired when a credit note document is sent to the customer.
  • customer.created — Fired when a customer is created (payload flags whether it was a portal self-signup).
  • card.added — Fired when a card is successfully saved for a customer (provider-opaque).
  • card.removed — Fired when a saved card is removed in-app or cancelled at the provider.
  • card.updated — Fired when a saved card’s details change (network auto-update or refresh).
  • card.expiring — Fired when a saved card is approaching expiry.
  • card.expired — Fired when a saved card is observed to have expired.
  • card.default_changed — Fired when the customer’s default card changes (explicit or auto-default).
  • card.backup_changed — Fired when the customer’s designated backup card is set, replaced, or cleared.
  • card.add_failed — Fired when a card-save attempt fails (decline or authentication failure).
  • quote.sent — Fired when a quote is sent to the customer.
  • quote.converted — Fired when a quote is converted into an order confirmation or an invoice.
  • order_confirmation.sent — Fired when an order confirmation is sent to the customer.
  • order_confirmation.converted — Fired when an order confirmation is converted into an invoice.
  • project.created — Fired when a project is created (payload carries the owned dimension id for correlation with the dimensions API).
  • project.updated — Fired when a project's fields are updated (payload lists the changed field names). Also fires on un-archive.
  • project.archived — Fired when a project is archived (its dimension is deactivated; postings history is preserved).
Enum values:
subscription.assigned
subscription.started
subscription.updated
subscription.transitioned
subscription.paused
subscription.resumed
subscription.trial_ended
subscription.cancellation_scheduled
Example: ["subscription.assigned"]
status
​string · enum · required

Delivery status. disabled endpoints are retained but receive no events.

Enum values:
enabled
disabled
Example: enabled
createdAt
​string · required

ISO 8601 creation timestamp.

Example: 2026-05-29T10:00:00.000Z
updatedAt
​string · required

ISO 8601 last-update timestamp.

Example: 2026-05-29T10:00:00.000Z
secret
​string · required

The signing secret (shown only on create and roll-secret). Used to verify the webhook-signature header.

Example: whsec_...
description
​string | null

Optional human-facing description of what this endpoint is used for.

Example: Production billing sync
POST/v1/webhook-endpoints/{id}/roll-secret
curl https://api.ledgerbee.com/api/v1/webhook-endpoints/:id/roll-secret \ --request POST \ --header 'x-api-key: <api-key>'
Example Responses
{ "id": "0192f3a1-...", "url": "https://example.com/webhooks/ledgerbee", "enabledEvents": [ "subscription.assigned" ], "status": "enabled", "description": "Production billing sync", "createdAt": "2026-05-29T10:00:00.000Z", "updatedAt": "2026-05-29T10:00:00.000Z", "secret": "whsec_..." }
json
application/json

Send a test event

POST
https://api.ledgerbee.com/api
/v1/webhook-endpoints/{id}/test
x-api-key (header)
or
OAuth 2.0

Synchronously POSTs a signed sample payload for the given event to the endpoint’s URL and returns the result. No delivery is recorded.

Send a test event › path Parameters

id
​string · required

The webhook endpoint id.

Send a test event › Request Body

TestWebhookEndpointRequest
event
​string · enum · required

The event type to simulate. Must be one of the endpoint’s subscribed events.

Available events:

  • subscription.assigned — Fired when a subscription is assigned to a customer (may be future-dated / upcoming).
  • subscription.started — Fired when a subscription becomes active — grant entitlement/access on this event, not on assigned.
  • subscription.updated — Fired when a config property changes without a structural transition (e.g. name, payment method, billing direction).
  • subscription.transitioned — Fired on a structural change: plan replace, product edit, billing cadence change, or realign.
  • subscription.paused — Fired when a subscription is paused.
  • subscription.resumed — Fired when a subscription resumes from a pause.
  • subscription.trial_ended — Fired when a subscription trial ends and normal billing begins (the sub stays active).
  • subscription.cancellation_scheduled — Fired when a future cancellation is scheduled for a subscription (still active until then).
  • subscription.cancellation_cleared — Fired when a previously scheduled cancellation is cleared.
  • subscription.churned — Fired when a subscription is cancelled/finalized — revoke entitlement on this event.
  • subscription.billed — Fired once per (child) subscription when a billing run produces its invoice.
  • subscription.payment_succeeded — Fired when a card charge for the subscription clears — the success pair of the charge_failed error signal.
  • subscription.error — Fired when a delivery/processing problem occurs for a subscription (e.g. undeliverable recipient).
  • billing.invoice_sent — Fired when an invoice document is sent to the customer.
  • billing.credit_note_sent — Fired when a credit note document is sent to the customer.
  • customer.created — Fired when a customer is created (payload flags whether it was a portal self-signup).
  • card.added — Fired when a card is successfully saved for a customer (provider-opaque).
  • card.removed — Fired when a saved card is removed in-app or cancelled at the provider.
  • card.updated — Fired when a saved card’s details change (network auto-update or refresh).
  • card.expiring — Fired when a saved card is approaching expiry.
  • card.expired — Fired when a saved card is observed to have expired.
  • card.default_changed — Fired when the customer’s default card changes (explicit or auto-default).
  • card.backup_changed — Fired when the customer’s designated backup card is set, replaced, or cleared.
  • card.add_failed — Fired when a card-save attempt fails (decline or authentication failure).
  • quote.sent — Fired when a quote is sent to the customer.
  • quote.converted — Fired when a quote is converted into an order confirmation or an invoice.
  • order_confirmation.sent — Fired when an order confirmation is sent to the customer.
  • order_confirmation.converted — Fired when an order confirmation is converted into an invoice.
  • project.created — Fired when a project is created (payload carries the owned dimension id for correlation with the dimensions API).
  • project.updated — Fired when a project's fields are updated (payload lists the changed field names). Also fires on un-archive.
  • project.archived — Fired when a project is archived (its dimension is deactivated; postings history is preserved).
Enum values:
subscription.assigned
subscription.started
subscription.updated
subscription.transitioned
subscription.paused
subscription.resumed
subscription.trial_ended
subscription.cancellation_scheduled
Example: subscription.assigned

Send a test event › Responses

The probe result.

TestWebhookEndpointResult
success
​boolean · required

Whether the endpoint responded with a 2xx status.

Example: true
durationMs
​number · required

Round-trip time of the probe in milliseconds.

Example: 142
statusCode
​number | null

HTTP status returned by the endpoint, or null on a transport error.

Example: 200
error
​string | null

Transport/error message when the probe failed, otherwise null.

Example: null
POST/v1/webhook-endpoints/{id}/test
curl https://api.ledgerbee.com/api/v1/webhook-endpoints/:id/test \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "event": "subscription.assigned" }'
Example Request Body
{ "event": "subscription.assigned" }
json
Example Responses
{ "success": true, "statusCode": 200, "durationMs": 142, "error": null }
json
application/json

VAT CodesPortal SSO