DELETE
/
plans
/
{code}
Authorization
Path
LAGO_URL="https://api.getlago.com"
API_KEY="__YOUR_API_KEY__"

curl --location --request DELETE "$LAGO_URL/api/v1/plans/:code" \
  --header "Authorization: Bearer $API_KEY"
{
  "plan": {
    "active_subscriptions_count": 123,
    "amount_cents": 10000,
    "amount_currency": "USD",
    "bill_charges_monthly": "null",
    "charges": [
      {
        "billable_metric_code": "requests",
        "charge_model": "package",
        "created_at": "2023-06-27T19:43:42Z",
        "group_properties": [],
        "invoice_display_name": "Setup",
        "invoiceable": true,
        "lago_billable_metric_id": "1a901a90-1a90-1a90-1a90-1a901a901a91",
        "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a91",
        "min_amount_cents": 3000,
        "pay_in_advance": false,
        "properties": {
          "amount": "30",
          "free_units": 100,
          "package_size": 1000
        },
        "prorated": false
      },
      {
        "billable_metric_code": "cpu",
        "charge_model": "graduated",
        "created_at": "2023-06-27T19:43:42Z",
        "group_properties": [],
        "invoice_display_name": "Setup",
        "invoiceable": true,
        "lago_billable_metric_id": "1a901a90-1a90-1a90-1a90-1a901a901a92",
        "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a92",
        "min_amount_cents": 0,
        "pay_in_advance": false,
        "properties": {
          "graduated_ranges": [
            {
              "flat_amount": "10",
              "from_value": 0,
              "per_unit_amount": "0.5",
              "to_value": 10
            },
            {
              "flat_amount": "0",
              "from_value": 11,
              "per_unit_amount": "0.4",
              "to_value": null
            }
          ]
        },
        "prorated": false
      },
      {
        "billable_metric_code": "seats",
        "charge_model": "standard",
        "created_at": "2023-06-27T19:43:42Z",
        "group_properties": [
          {
            "group_id": "1a901a90-1a90-1a90-1a90-1a901a901a01",
            "invoice_display_name": "Europe",
            "values": {
              "amount": "10"
            }
          },
          {
            "group_id": "1a901a90-1a90-1a90-1a90-1a901a901a02",
            "invoice_display_name": "USA",
            "values": {
              "amount": "5"
            }
          },
          {
            "group_id": "1a901a90-1a90-1a90-1a90-1a901a901a03",
            "invoice_display_name": "Africa",
            "values": {
              "amount": "8"
            }
          }
        ],
        "invoice_display_name": "Setup",
        "invoiceable": true,
        "lago_billable_metric_id": "1a901a90-1a90-1a90-1a90-1a901a901a93",
        "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a93",
        "min_amount_cents": 0,
        "pay_in_advance": true,
        "properties": {},
        "prorated": false
      },
      {
        "billable_metric_code": "storage",
        "charge_model": "volume",
        "created_at": "2023-06-27T19:43:42Z",
        "group_properties": [],
        "invoice_display_name": "Setup",
        "invoiceable": true,
        "lago_billable_metric_id": "1a901a90-1a90-1a90-1a90-1a901a901a94",
        "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a94",
        "min_amount_cents": 0,
        "pay_in_advance": false,
        "properties": {
          "volume_ranges": [
            {
              "flat_amount": "0",
              "from_value": 0,
              "per_unit_amount": "0",
              "to_value": 100
            },
            {
              "flat_amount": "0",
              "from_value": 101,
              "per_unit_amount": "0.5",
              "to_value": null
            }
          ]
        },
        "prorated": false
      },
      {
        "billable_metric_code": "payments",
        "charge_model": "percentage",
        "created_at": "2023-06-27T19:43:42Z",
        "group_properties": [],
        "invoice_display_name": "Setup",
        "invoiceable": false,
        "lago_billable_metric_id": "1a901a90-1a90-1a90-1a90-1a901a901a95",
        "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a95",
        "min_amount_cents": 0,
        "pay_in_advance": true,
        "properties": {
          "fixed_amount": "0.5",
          "free_units_per_events": 5,
          "free_units_per_total_aggregation": "500",
          "rate": "1"
        },
        "prorated": false
      }
    ],
    "code": "startup",
    "created_at": "2023-06-27T19:43:42Z",
    "description": "<string>",
    "draft_invoices_count": 123,
    "interval": "monthly",
    "invoice_display_name": "Startup plan",
    "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
    "name": "Startup",
    "pay_in_advance": true,
    "taxes": [],
    "trial_period": 5
  }
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

code
string
required

The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.

Response

200 - application/json
plan
object
required