Skip to main content

Subscriptions API

Manage your organization's subscription plan.

Create a checkout session

Start a new subscription by creating a Stripe checkout session.

POST /api/v1/subscription/create
curl -X POST https://app.hooklistener.com/api/v1/subscription/create \
-H "Authorization: Bearer hklst_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"plan": "pro"
}'

Response:

{
"checkout_url": "https://checkout.stripe.com/c/pay/..."
}

Redirect the user to the checkout_url to complete payment.

Cancel a subscription

POST /api/v1/subscription/cancel
curl -X POST https://app.hooklistener.com/api/v1/subscription/cancel \
-H "Authorization: Bearer hklst_your_api_key"

The subscription remains active until the end of the current billing period.

Response:

{
"message": "Subscription cancelled. Access continues until the end of the billing period.",
"active_until": "2025-02-15T00:00:00Z"
}

Resume a cancelled subscription

If you've cancelled but are still within the billing period, you can resume:

POST /api/v1/subscription/resume
curl -X POST https://app.hooklistener.com/api/v1/subscription/resume \
-H "Authorization: Bearer hklst_your_api_key"

Response:

{
"message": "Subscription resumed successfully"
}

Plan management

To view your current plan and features, use the organization plan endpoint:

curl https://app.hooklistener.com/api/v1/organizations/<org-id>/plan \
-H "Authorization: Bearer hklst_your_api_key"

See Plans & Billing for plan comparisons.