LedgerBee Developer
  • Getting started
  • Conventions
  • Products
  • Configuration
  • API Reference
Information
Accounts
    List accountsget
API Key
    Get current API keyget
Company
    Get company detailsget
Credit Notes
    List credit notesgetCreate a credit notepostGet a credit notegetGet the delivery status of a credit notegetDownload the credit note PDFgetSend a credit note to the customerpost
Customers
    List customersgetCreate a customerpostGet a customergetUpdate a customerpatchList a customer's contactsgetList a customer's departmentsgetList customer groupsget
Dimensions
    List all dimensionsgetCreate a new dimension categorypostGet a dimensiongetUpdate a dimension categoryputDelete a dimension categorydeleteCreate a new dimension valuepostUpdate a dimension valueputDelete a dimension valuedelete
Document Templates
    List document templatesget
Draft Journal Entries
    Create multiple draft journal entries in batchpostList draft journal entriesgetCreate a draft journal entrypostGet a draft journal entrygetDelete a draft journal entrydeleteBook a draft journal entrypost
Draft Journal Entries (v2)
    Create draft journal entries in batch (v2)postList draft journal entries (v2)getCreate a draft journal entry (v2)postGet a draft journal entry (v2)getDelete a draft journal entry (v2)deleteUpdate a draft journal entry (v2)patchBook a draft journal entry (v2)post
Entitlements
    List entitlementsgetCreate an entitlementpostGet an entitlementgetDelete an entitlementdeleteUpdate an entitlementpatch
Invoices
    List invoicesgetCreate a draft invoicepostGet an invoicegetGet the delivery status of an invoicegetDownload the invoice PDFgetSend an invoice to the customerpost
Journal Categories
    List journal categoriesget
Journal Entries
    Create multiple journal entries in batchpostList journal entriesgetCreate a journal entrypostGet a 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
Journal Entries (v2)
    Create a journal entry (v2)postCreate journal entries in batch (v2)post
MCP
    LedgerBee Developer MCP Serverpost
Meters
    List meter subscriptions by IDgetReport usagepostList meter subscriptions by nameget
Order Confirmations
    List order confirmationsgetCreate a draft order confirmationpostGet an order confirmationgetUpdate a draft order confirmationpatchConvert an order confirmation into an invoicepostDownload an order confirmation as PDFgetSend an order confirmationpost
Payment Methods
    List saved payment methods for a customergetCancel 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
Portal Plans
    List the full plan cataloguegetGet a plangetResolve the gated pricing catalogue for an identified buyer (partner display)post
Portal SSO
    Get a tenant's SSO signing keys (JWKS)getMint a customer-portal SSO handoff referencepostProvision a customer + grant portal access (partner JIT provisioning)postRevoke (force-refresh) a user's customer-portal sessionspost
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 projectsgetCreate or update a project by external referenceputCreate a projectpostGet a projectgetUpdate a projectputGet project profitgetAdd a subprojectpostUpdate a subprojectputDelete a subprojectdelete
Quotes
    List quotesgetCreate a draft quotepostGet a quotegetUpdate a draft quotepatchConvert a quotepostDownload a quote as PDFgetSend a quotepost
Subscriptions
    List customer subscriptionsgetAssign a subscription to a customerpostGet a customer subscription by its stable idgetUpdate a customer subscriptionpatchRetry a failed card paymentpostList a subscription's pending scheduled changesgetCancel a single pending scheduled changedeleteCancel a customer subscriptionpostList subscription plansgetCreate a subscription planpostArchive a subscription planpost
Suppliers
    List suppliersgetCreate a supplierpostList supplier contactsgetList supplier departmentsgetList supplier groupsget
VAT Codes
    List VAT codesget
Vendors
    List vendorsgetCreate a vendorpostList vendor contactsgetList vendor departmentsgetList vendor groupsget
Webhook Endpoints
    List webhook endpointsgetCreate a webhook endpointpostRetrieve a webhook endpointgetUpdate a webhook endpointputDelete a webhook endpointdeleteRoll the signing secretpostSend a test eventpost
Schemas
LedgerBee Public API
LedgerBee Public API

Portal Plans

Download schema

List the full plan catalogue

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

Returns every ACTIVE plan with a PUBLISHED version in the API key's tenant, projected as its canonical native card and ordered by display order. This is the integrator's FULL catalogue — it does NOT run the per-buyer rule engine, does NOT filter by any plan-routing visibility rule, and mints NO token. Use it to read all your plans (e.g. to build pricing pages), as opposed to resolve, which returns only the subset a specific buyer matches.

Required Scope

  • portal-catalog-read

Required License

  • Customer Portal — the tenant must also hold this module license, or the request returns 403 LICENSE.REQUIRED.

List the full plan catalogue › query Parameters

language
​string · enum

Language the resolved cards are localized to. Defaults to en.

Enum values:
en
da
Example: en

List the full plan catalogue › Responses

PublicPortalPlansListResponse
​PublicPortalCatalogEntry[] · required

Every ACTIVE plan with a PUBLISHED version in the API key's tenant, projected as its canonical native card and ordered by display order. This is the integrator's full catalogue — NOT filtered by any per-visitor visibility rule and NOT run through the plan-routing rule engine. Each entry carries the full card content the integrator renders.

GET/v1/portal/plans
curl https://api.ledgerbee.com/api/v1/portal/plans \ --header 'x-api-key: <api-key>'
Example Responses
{ "plans": [ { "plan": { "id": "id", "planVersionId": "planVersionId", "vanity": "vanity", "title": "title", "description": "description", "cardStyle": "variant1", "displayedCadences": [ "month-1", "year-1" ], "defaultDisplayedCadence": "defaultDisplayedCadence", "items": [ { "id": "id", "itemType": "SUBSCRIPTION", "sourceSubscriptionId": "sourceSubscriptionId", "ctaLink": "ctaLink", "ctaPresetKey": "ctaPresetKey", "displayOrder": 0, "planName": "planName", "description": "description", "features": [ "string" ], "isMostPopular": true, "ctaLabel": "ctaLabel", "titleColor": "titleColor", "ctaColor": "ctaColor", "planIconKey": "planIconKey", "planIconColor": "planIconColor", "hidePlanIcon": true, "featureIconColor": "featureIconColor", "currency": "DKK", "priceMinor": 9900, "cadenceKey": "month-1", "allowedCadences": [ "month-1", "year-1" ], "defaultCadence": "month-1", "cadencePrices": { "month-1": 9900, "year-1": 99000 }, "oneTimeMinor": 0, "products": [ { "priceId": "priceId", "label": "label", "quantity": 1, "pricingModel": "flat_rate", "kind": "RECURRING", "unitPriceMinor": 1000, "currency": "DKK", "tiered": true, "tiers": [ { "fromQuantity": 0, "toQuantity": 100, "unitAmountMinor": 1000, "flatFeeMinor": null } ], "billingInterval": "month", "billingIntervalCount": 1 } ], "productsByCadence": { "key": [ { "priceId": "priceId", "label": "label", "quantity": 1, "pricingModel": "flat_rate", "kind": "RECURRING", "unitPriceMinor": 1000, "currency": "DKK", "tiered": true, "tiers": [ { "fromQuantity": 0, "toQuantity": 100, "unitAmountMinor": 1000, "flatFeeMinor": null } ], "billingInterval": "month", "billingIntervalCount": 1 } ] } } ], "comparison": { "sections": [ { "title": "title", "rows": [ { "label": "label", "cells": { "key": { "kind": "empty", "value": "value" } } } ] } ] } }, "displayOrder": 0, "isLegacyForVisitor": true } ] }
json
application/json

Get a plan

GET
https://api.ledgerbee.com/api
/v1/portal/plans/{planId}
x-api-key (header)
or
OAuth 2.0

Returns a single plan by its id, projected as its canonical native card — the integrator's by-id read. Does NOT run the rule engine and does NOT filter by visibility rules: every published plan of the tenant resolves here. Returns 404 PORTAL_PLAN_NOT_FOUND only when the plan id is unknown to the tenant or has no published version.

Required Scope

  • portal-catalog-read

Required License

  • Customer Portal — the tenant must also hold this module license, or the request returns 403 LICENSE.REQUIRED.

Get a plan › path Parameters

planId
​string · required

The plan id (uuid).

Example: 550e8400-e29b-41d4-a716-446655440100

Get a plan › query Parameters

language
​string · enum

Language the resolved cards are localized to. Defaults to en.

Enum values:
en
da
Example: en

Get a plan › Responses

PublicPortalPlanResponse
​object · required

A single plan projected as its canonical native card. Returns 404 PORTAL_PLAN_NOT_FOUND only when the plan id is unknown to the API key's tenant or has no published version — never filtered by visibility rules or the rule engine.

GET/v1/portal/plans/{planId}
curl https://api.ledgerbee.com/api/v1/portal/plans/:planId \ --header 'x-api-key: <api-key>'
Example Responses
{ "plan": { "plan": { "id": "id", "planVersionId": "planVersionId", "vanity": "vanity", "title": "title", "description": "description", "cardStyle": "variant1", "displayedCadences": [ "month-1", "year-1" ], "defaultDisplayedCadence": "defaultDisplayedCadence", "items": [ { "id": "id", "itemType": "SUBSCRIPTION", "sourceSubscriptionId": "sourceSubscriptionId", "ctaLink": "ctaLink", "ctaPresetKey": "ctaPresetKey", "displayOrder": 0, "planName": "planName", "description": "description", "features": [ "string" ], "isMostPopular": true, "ctaLabel": "ctaLabel", "titleColor": "titleColor", "ctaColor": "ctaColor", "planIconKey": "planIconKey", "planIconColor": "planIconColor", "hidePlanIcon": true, "featureIconColor": "featureIconColor", "currency": "DKK", "priceMinor": 9900, "cadenceKey": "month-1", "allowedCadences": [ "month-1", "year-1" ], "defaultCadence": "month-1", "cadencePrices": { "month-1": 9900, "year-1": 99000 }, "oneTimeMinor": 0, "products": [ { "priceId": "priceId", "label": "label", "quantity": 1, "pricingModel": "flat_rate", "kind": "RECURRING", "unitPriceMinor": 1000, "currency": "DKK", "tiered": true, "tiers": [ { "fromQuantity": 0, "toQuantity": 100, "unitAmountMinor": 1000, "flatFeeMinor": null } ], "billingInterval": "month", "billingIntervalCount": 1 } ], "productsByCadence": { "key": [ { "priceId": "priceId", "label": "label", "quantity": 1, "pricingModel": "flat_rate", "kind": "RECURRING", "unitPriceMinor": 1000, "currency": "DKK", "tiered": true, "tiers": [ { "fromQuantity": 0, "toQuantity": 100, "unitAmountMinor": 1000, "flatFeeMinor": null } ], "billingInterval": "month", "billingIntervalCount": 1 } ] } } ], "comparison": { "sections": [ { "title": "title", "rows": [ { "label": "label", "cells": { "key": { "kind": "empty", "value": "value" } } } ] } ] } }, "displayOrder": 0, "isLegacyForVisitor": true } }
json
application/json

Resolve the gated pricing catalogue for an identified buyer (partner display)

POST
https://api.ledgerbee.com/api
/v1/portal/plans/resolve
x-api-key (header)
or
OAuth 2.0

Runs the plan-routing rule engine for the buyer identified by customerId (or the no-customer-yet countryCode/customerType hints) within the API key's tenant, and returns the plans that buyer can SEE and CHECK OUT — including non-public (gated) plans the buyer matches — plus a reusable, read-only load-time catalog token. The partner returns the token to each embed iframe (via its fetchCatalogToken provider) to authorize the by-id pricing-card / checkout-document reads. Does NOT consult allowSelfSignup and never publishes to the CDN.

Required Scope

  • portal-catalog-read

Required License

  • Customer Portal — the tenant must also hold this module license, or the request returns 403 LICENSE.REQUIRED.

Resolve the gated pricing catalogue for an identified buyer (partner display) › Headers

x-api-idempotency-key
​string · maxLength: 255

Optional idempotency key for safely retrying mutating requests.

Resolve the gated pricing catalogue for an identified buyer (partner display) › Request Body

PublicResolvePortalPlansRequest
customerId
​string

The buyer's LedgerBee customer id (an identity HANDLE — the server hydrates customer group / country / type from it; raw rule attributes are never accepted). The customer must exist in the API key's tenant (a 404 CUSTOMER_NOT_FOUND otherwise). When present, the server-resolved identity wins and the countryCode/customerType hints are ignored.

Example: 550e8400-e29b-41d4-a716-446655440010
buyerEmail
​string

The specific person (their email) the partner is acting on behalf of under customerId — e.g. the user currently signed in on the partner's site. Bound into the catalog token: when that token is later exchanged for a portal login handoff, THIS person is logged in (or bootstrapped credential-less under the customer's organization), instead of the customer's contact email / first member. Ignored without customerId; does not affect catalog visibility.

Example: buyer@partner.example
countryCode
​string

ISO 3166-1 alpha-2 country hint for the no-customer-yet preview (drives the country rule clause). Ignored when customerId is supplied.

Example: DK
customerType
​string · enum

Customer-type hint for the no-customer-yet preview (drives the customerType rule clause). Ignored when customerId is supplied.

Enum values:
BUSINESS
PRIVATE_PERSON
Example: BUSINESS
planIds
​string[]

Resolve only these plan ids. Omit to resolve every ACTIVE plan of the tenant. Each must be a uuid.

Example: ["550e8400-e29b-41d4-a716-446655440100"]
language
​string · enum

Language the resolved cards are localized to. Defaults to en.

Enum values:
en
da
Example: en

Resolve the gated pricing catalogue for an identified buyer (partner display) › Responses

PublicResolvePortalPlansResponse
​PublicPortalCatalogEntry[] · required

The plans visible AND checkout-able to the resolved buyer, each carrying the full card content the partner renders. Non-public (gated) plans appear here when the buyer matches their rule.

catalogToken
​string · required

Opaque, reusable, read-only load-time catalog token (43-char base64url). The partner returns it to each embed iframe via its fetchCatalogToken provider; the iframe presents it as a Bearer token to the by-id pricing-card / checkout-document reads. Scoped to the resolved buyer + the returned plans — replay yields only the same already-authorized cards. Treat it as a client secret (TLS-only, never log, never put on a URL).

Example: Yk3pQ9sV2nR7tW1xZ4cB8mL6dF0aH5jE2gN9uK3pQ7s
expiresAt
​string · required

ISO-8601 expiry of the catalog token.

Example: 2026-06-06T12:34:56.000Z
POST/v1/portal/plans/resolve
curl https://api.ledgerbee.com/api/v1/portal/plans/resolve \ --request POST \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "customerId": "550e8400-e29b-41d4-a716-446655440010", "buyerEmail": "buyer@partner.example", "countryCode": "DK", "customerType": "BUSINESS", "planIds": [ "550e8400-e29b-41d4-a716-446655440100" ], "language": "en" }'
Example Request Body
{ "customerId": "550e8400-e29b-41d4-a716-446655440010", "buyerEmail": "buyer@partner.example", "countryCode": "DK", "customerType": "BUSINESS", "planIds": [ "550e8400-e29b-41d4-a716-446655440100" ], "language": "en" }
json
application/json
Example Responses
{ "plans": [ { "plan": { "id": "id", "planVersionId": "planVersionId", "vanity": "vanity", "title": "title", "description": "description", "cardStyle": "variant1", "displayedCadences": [ "month-1", "year-1" ], "defaultDisplayedCadence": "defaultDisplayedCadence", "items": [ { "id": "id", "itemType": "SUBSCRIPTION", "sourceSubscriptionId": "sourceSubscriptionId", "ctaLink": "ctaLink", "ctaPresetKey": "ctaPresetKey", "displayOrder": 0, "planName": "planName", "description": "description", "features": [ "string" ], "isMostPopular": true, "ctaLabel": "ctaLabel", "titleColor": "titleColor", "ctaColor": "ctaColor", "planIconKey": "planIconKey", "planIconColor": "planIconColor", "hidePlanIcon": true, "featureIconColor": "featureIconColor", "currency": "DKK", "priceMinor": 9900, "cadenceKey": "month-1", "allowedCadences": [ "month-1", "year-1" ], "defaultCadence": "month-1", "cadencePrices": { "month-1": 9900, "year-1": 99000 }, "oneTimeMinor": 0, "products": [ { "priceId": "priceId", "label": "label", "quantity": 1, "pricingModel": "flat_rate", "kind": "RECURRING", "unitPriceMinor": 1000, "currency": "DKK", "tiered": true, "tiers": [ { "fromQuantity": 0, "toQuantity": 100, "unitAmountMinor": 1000, "flatFeeMinor": null } ], "billingInterval": "month", "billingIntervalCount": 1 } ], "productsByCadence": { "key": [ { "priceId": "priceId", "label": "label", "quantity": 1, "pricingModel": "flat_rate", "kind": "RECURRING", "unitPriceMinor": 1000, "currency": "DKK", "tiered": true, "tiers": [ { "fromQuantity": 0, "toQuantity": 100, "unitAmountMinor": 1000, "flatFeeMinor": null } ], "billingInterval": "month", "billingIntervalCount": 1 } ] } } ], "comparison": { "sections": [ { "title": "title", "rows": [ { "label": "label", "cells": { "key": { "kind": "empty", "value": "value" } } } ] } ] } }, "displayOrder": 0, "isLegacyForVisitor": true } ], "catalogToken": "Yk3pQ9sV2nR7tW1xZ4cB8mL6dF0aH5jE2gN9uK3pQ7s", "expiresAt": "2026-06-06T12:34:56.000Z" }
json
application/json

Payment MethodsPortal SSO