ApiEndpoints
Billing Endpoints
Manage subscriptions, checkout sessions, and the billing portal.
The Billing family manages your Sureshake subscription and payment settings via Stripe.
Create Checkout Session
Generate a unique Stripe Checkout URL to subscribe to a specific plan.
POST
/api/v1/billing/checkoutcurl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"planId": "individual_professional", "billingCycle": "monthly"}' \
https://api.sureshake.com/api/v1/billing/checkout201 Created
{
"data": {
"id": "cs_test_...",
"url": "https://checkout.stripe.com/...",
"expiresAt": 1710518400,
"planId": "individual_professional",
"billingCycle": "monthly"
},
"meta": {
"timestamp": "2024-03-15T10:00:00Z"
}
}Get Current Subscription
Retrieve details about your active subscription.
GET
/api/v1/billing/subscriptioncurl -H "Authorization: Bearer $TOKEN" https://api.sureshake.com/api/v1/billing/subscription
Billing Portal
Generate a link to the Stripe Customer Portal where you can manage payment methods and view invoices.
POST
/api/v1/billing/portalcurl -X POST -H "Authorization: Bearer $TOKEN" https://api.sureshake.com/api/v1/billing/portal
Cancel Subscription
Disable auto-renewal for your current subscription. It will remain active until the end of the current period.
POST
/api/v1/billing/subscription/cancelcurl -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"subscriptionId": "sub_..."}' \
https://api.sureshake.com/api/v1/billing/subscription/cancel