Skip to main content
POST
/
api
/
v1
/
payments
/
stripe
/
cancel-subscription
Cancel Subscription
curl --request POST \
  --url https://api.devkit4ai.com/api/v1/payments/stripe/cancel-subscription \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "cancel_immediately": false
}
'
{
  "subscription_id": "<string>",
  "status": "<string>",
  "message": "<string>",
  "cancel_at": "2023-11-07T05:31:56Z",
  "cancelled_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

test_mode
boolean
default:true

Use test mode

Body

application/json

Request to cancel a subscription.

cancel_immediately
boolean
default:false

If true, cancels immediately. Otherwise cancels at period end.

Response

Successful Response

Cancel subscription response.

subscription_id
string
required
status
string
required
message
string
required
cancel_at
string<date-time> | null
cancelled_at
string<date-time> | null