Skip to main content
GET
/
plans
/
{id}
Get plan
curl --request GET \
  --url https://api.lava.so/v1/plans/{id} \
  --header 'Authorization: Bearer <token>'
{
  "plan_id": "<string>",
  "merchant_id": "<string>",
  "name": "<string>",
  "period_amount": "<string>",
  "included_credit": "<string>",
  "billing_interval": "day",
  "rollover_type": "full",
  "bundle_rollover_type": "full",
  "default_auto_top_up_bundle_id": "<string>",
  "linked_meters": [
    {
      "meter_id": "<string>",
      "name": "<string>"
    }
  ],
  "credit_bundles": [
    {
      "credit_bundle_id": "<string>",
      "name": "<string>",
      "cost": "<string>",
      "credit_amount": "<string>"
    }
  ],
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer token authentication used for standard API calls. Format: 'Bearer YOUR_API_KEY'

Path Parameters

id
string
required

Plan ID

Response

Plan details

plan_id
string
required

Unique identifier for the plan

merchant_id
string
required

Merchant ID that owns this plan

name
string
required

Name of the plan

period_amount
string
required

Period amount in USD (high precision decimal as string)

included_credit
string
required

Included credit per billing cycle in USD (high precision decimal as string)

billing_interval
enum<string>
required

How often the subscription is billed

Available options:
day,
week,
month,
year
rollover_type
enum<string>
required

Cycle rollover: whether unused included credit rolls to next cycle

Available options:
full,
none
bundle_rollover_type
enum<string>
required

Bundle rollover: whether unused bundle credit rolls to next cycle

Available options:
full,
none
default_auto_top_up_bundle_id
string | null
required

ID of the credit bundle that will be auto-purchased when a subscription cycle runs out of credit. Null if auto top-up is disabled.

linked_meters
object[]
required

Meters linked to this plan

credit_bundles
object[]
required

Credit bundles available for this plan

created_at
string<date-time>
required

When the plan was created