Skip to main content
POST
/
subscriptions
Create subscription
curl --request POST \
  --url https://api.lava.so/v1/subscriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer_id": "con_test_01EXAMPLE00000000000000001",
  "plan_id": "subconf_abc123"
}
'
{
  "subscription": "<unknown>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
customer_id
string
required

Customer ID (con_xxx) or your reference_id. Both are accepted interchangeably.

Example:

"con_test_01EXAMPLE00000000000000001"

plan_id
string
required

ID of the plan to assign. Must be a free plan (period_amount = 0).

Example:

"subconf_abc123"

Response

Subscription created

subscription
any
required