Cancel Subscription
Cancel your current subscription. Access continues until the end of the current billing period.
POST /api/v1/billing/cancel
Authentication
JWT Bearer Token required via Authorization header.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | No | Cancellation reason (for feedback) |
immediate | boolean | No | If true, cancel immediately instead of at period end. Defaults to false. |
Example Request
{
"reason": "Switching to a different service",
"immediate": false
}
Response
200 OK
{
"subscription": {
"id": "sub_abc123",
"status": "active",
"cancelAtPeriodEnd": true,
"currentPeriodEnd": "2026-04-29T00:00:00Z"
},
"message": "Subscription will be canceled at the end of the current period"
}
Code Examples
cURL
curl -X POST https://api.audiospliter.com/api/v1/billing/cancel \
-H "Authorization: Bearer your_jwt_token" \
-H "Content-Type: application/json" \
-d '{"reason": "No longer needed"}'
Node.js
const response = await fetch(
'https://api.audiospliter.com/api/v1/billing/cancel',
{
method: 'POST',
headers: {
'Authorization': `Bearer ${jwtToken}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ reason: 'No longer needed' }),
}
);
const result = await response.json();
console.log(result.message);
Python
import requests
response = requests.post(
'https://api.audiospliter.com/api/v1/billing/cancel',
headers={'Authorization': f'Bearer {jwt_token}'},
json={'reason': 'No longer needed'},
)
print(response.json()['message'])