Skip to main content
POST
/
api
/
v1
/
subscriptions
Create Subscription
curl --request POST \
  --url https://api.example.com/api/v1/subscriptions \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer_id": "<string>",
  "plan_id": "<string>",
  "billing_interval": "<string>",
  "start_date": "<string>",
  "trial_end_date": "<string>"
}
'
{
  "id": "...",
  "customer_id": "...",
  "plan_id": "...",
  "plan_name": "Pro",
  "status": "TRIAL",
  "billing_interval": "month",
  "current_period_start": "2025-01-01T00:00:00Z",
  "current_period_end": "2025-02-01T00:00:00Z",
  "trial_end_date": "2025-01-15T00:00:00Z",
  "created_at": "2025-01-01T00:00:00Z"
}
customer_id
string
required
UUID of the customer
plan_id
string
required
UUID of the plan
billing_interval
string
required
Billing cadence: day, week, month, year
start_date
string
required
ISO 8601 datetime when the subscription begins
trial_end_date
string
Override the plan’s default trial end date
{
  "id": "...",
  "customer_id": "...",
  "plan_id": "...",
  "plan_name": "Pro",
  "status": "TRIAL",
  "billing_interval": "month",
  "current_period_start": "2025-01-01T00:00:00Z",
  "current_period_end": "2025-02-01T00:00:00Z",
  "trial_end_date": "2025-01-15T00:00:00Z",
  "created_at": "2025-01-01T00:00:00Z"
}