Pricing Tables API

The Pricing Tables API allows you to create, manage, and retrieve pricing tables for display in your application. Pricing tables are composed of plans and their associated pricing information, and can be fetched publicly using a publishable API key.

Overview

The Pricing Tables API provides both management and public-facing endpoints:

  • Management: Create, update, and delete pricing tables and their plan associations.
  • Public: Fetch fully-resolved pricing table data, suitable for direct rendering in your UI.

Authentication

  • Management endpoints require authentication via merchant credentials.
  • Public endpoints require a publishable API key (X-Lumen-Key header).

Endpoints

List all Pricing Tables

Retrieves a list of all pricing tables for the authenticated merchant.

GET https://api.getlumen.dev/v1/pricing-tables

Response

{
  "pricingTables": [
    {
      "id": "pt_123",
      "name": "Default Pricing Table",
      "slug": "default",
      "pricingTablePlans": [
        {
          "planId": "plan_456",
          "displayOrder": 1
        }
      ]
    }
  ]
}

Get a Specific Pricing Table

Retrieves a single pricing table by its ID, including detailed plan and pricing information.

GET https://api.getlumen.dev/v1/pricing-tables/{id}

Parameters

ParameterTypeDescription
idstringThe ID of the pricing table.

Response

{
  "pricingTable": {
    "id": "pt_123",
    "name": "Default Pricing Table",
    "slug": "default",
    "plans": [
      {
        "id": "plan_456",
        "name": "Pro Plan",
        "features": [],
        "price": {
          "id": "price_789",
          "currency": "usd",
          "pricingData": {}
        }
      }
    ]
  }
}

Create a Pricing Table

Creates a new pricing table with an initial set of plans.

POST https://api.getlumen.dev/v1/pricing-tables

Request Body

{
  "name": "New Pricing Table",
  "slug": "new-pricing",
  "planIds": ["plan_123", "plan_456"]
}

Update a Pricing Table

Updates the properties of an existing pricing table.

POST https://api.getlumen.dev/v1/pricing-tables/{id}

Delete a Pricing Table

Soft deletes a pricing table and its plan associations.

DELETE https://api.getlumen.dev/v1/pricing-tables/{id}

Add a Plan to a Pricing Table

Associates an existing plan with a pricing table.

POST https://api.getlumen.dev/v1/pricing-tables/{id}/plans

Update a Plan in a Pricing Table

Updates the configuration of a plan within a pricing table (e.g., display order).

POST https://api.getlumen.dev/v1/pricing-tables/plans/{id}

Remove a Plan from a Pricing Table

Removes the association between a plan and a pricing table.

DELETE https://api.getlumen.dev/v1/pricing-tables/plans/{id}

Public Endpoints

Get Public Pricing Table by Slug

Retrieves a fully-resolved pricing table by its slug, for use with a publishable key.

GET https://api.getlumen.dev/v1/public/pricing-tables/{slug}

Headers

HeaderValue
X-Lumen-Keyyour_publishable_key

Response

A detailed pricing table object, ready for rendering.