# Cancel a subscription contract Cancels an existing subscription contract. This operation terminates all future billing and delivery cycles for the subscription. The cancellation takes effect immediately. Important Notes: - Any pending/scheduled orders will be cancelled - The customer will receive a cancellation confirmation email if SUBSCRIPTION_CANCELLED email template is enabled - Cancellation feedback and notes are stored for analytics and reporting - Minimum cycle requirements ARE enforced via API (unlike internal cancellations) - If the subscription is under a free trial period, minimum cycles are not enforced Validation Rules: - Contract must exist and belong to the authenticated shop - Contract must not already be cancelled - Must have completed minimum required billing cycles (unless in trial) Post-Cancellation: - Status changes to 'cancelled' (lowercase) - Any pause settings are cleared - Cancellation feedback and notes are saved - Activity log entry is created - Cancellation email is sent (if enabled) - Any invalid discount codes are automatically removed Authentication: Requires valid X-API-Key header Endpoint: DELETE /api/external/v2/subscription-contracts/{id} Version: 0.0.1 ## Path parameters: - `id` (integer, required) The unique identifier of the subscription contract to cancel. Must be a valid contract ID that belongs to the authenticated shop. Example: 123456789 ## Query parameters: - `cancellationFeedback` (string) Optional feedback from the customer about why they are cancelling. This information is valuable for understanding cancellation reasons and improving retention. Common values include: 'Too expensive', 'No longer needed', 'Found alternative', 'Quality issues', 'Delivery issues', 'Customer service', 'Product not as expected', etc. This field is stored permanently with the contract for analytics. Example: "Too expensive" - `cancellationNote` (string) Optional internal note for recording additional cancellation context. This field is for internal use and not visible to customers. Can be used to track special circumstances, support ticket references, competitor information, or other relevant details about why the customer cancelled. This note is stored permanently with the contract. Example: "Customer switching to competitor X due to pricing. Support ticket #12345" ## Response 204 fields ## Response 400 fields ## Response 401 fields ## Response 403 fields