cURL
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" }
Subscribe a customer to a plan.
day
week
month
year
Was this page helpful?