---
title: "POST /subscriptions/{id}/scheduleCancel"
method: POST
path: "/subscriptions/{id}/scheduleCancel"
tags: ["Subscriptions"]
---

# POST /subscriptions/{id}/scheduleCancel

`POST /subscriptions/{id}/scheduleCancel`

Schedule an individual subscription to be canceled. Only subscriptions with an active status may be scheduled.

## Path parameters

- `id` integer, required

## Request body

- object
  - `cancel_when` string — Either custom or end. When selecting end, the Subscription will be canceled at the end of the current billing period. When selecting custom, the Subscription will be canceled on the date specified with the schedule_date parameter
  - `schedule_date` string — The date at which the Subscription should cancel. If cancel_when is set to custom, this parameter is required.

## Response `200`

Successful operation

- SubscriptionService — Subscription
  - `id` integer — The SamCart ID for the subscription
  - `customer_id` integer — The SamCart ID for the customer that created the charge
  - `affiliate_id` integer, nullable — The SamCart ID of the affiliate credited for the order.
  - `order_id` integer — The SamCart ID for the order. For subscriptions, this will be the order ID of the original purchase.
  - `product_id` integer — The SamCart ID for a product in the cart
  - `sku` string, nullable — The optional product SKU for the subscription
  - `status` 'active' | 'canceled' | 'delinquent' | 'completed' | 'paused' | 'invalid_processor' | 'sca_required' | 'deleted' — The status of the subscription
  - `type` 'limited_subscription' | 'recurring_subscription' — Indicates the format of the subscription
  - `product_name` string — The name of the product for the subscription
  - `internal_product_name` string, nullable — An optional product name displayed on the marketplace dashboard for the subscription
  - `initial_price` object — The pricing structure for the first charge of the subscription
    - `subtotal` integer — The initial price (in cents) excluding discount, taxes and shipping fees
    - `taxes` integer — The initial tax fees (in cents)
    - `shipping` integer — The initial shipping fees (in cents)
    - `total` integer — The initial price (in cents) including discount, taxes and shipping fees
  - `recurring_price` object — The pricing structure for all the recurring charges of the subscription
    - `subtotal` integer — The recurring price (in cents) excluding discount, taxes and shipping fees
    - `taxes` integer — The recurring tax fees (in cents)
    - `shipping` integer — The recurring shipping fees (in cents)
    - `total` integer — The recurring price (in cents) including discount, taxes and shipping fees
  - `coupon` object — An optional coupon that is applied to the subscription rebill
    - `id` integer — The ID of the coupon that was used on the subscription
    - `charge_instance` 'one_time' | 'recurring' — Whether the coupon applies only once or for recurring charges also
    - `code` string — The code of the coupon used
    - `type` 'flat_rate' | 'percentage' — The type of discount applied
    - `discount_amount` integer, nullable — The flat_rate discount amount (in cents) on the subscription
    - `discount_percentage` integer, nullable — The percentage discount on the subscription
  - `cancel_schedule` SubscriptionScheduledCancellationsTransformer — SubscriptionScheduledCancellations
    - `status` string — The status of the cancelation
    - `cancel_date` string, date-time, nullable — The UTC date and time that a subscription is scheduled to end.
  - `processor_name` 'Stripe' | 'Braintree' | 'Authorize.net' | 'PayPal' — The name of the processor for the order
  - `test_mode` boolean — Indicates whether the transaction was done while the product was in test mode.
  - `card_used` number, nullable — The last 4 digits of the card that was used. PayPal charges will have a null value.
  - `created_at` string, date-time — The UTC date and time the subscription was created. This is also when the original order was created.
  - `start_date` string, date-time — The UTC date and time the first rebill occurred. For subscriptions with trials, this will be the first rebill after the trial.
  - `end_date` string, date-time, nullable — The UTC date and time that a limited subscription will end. Recurring subscriptions will not have a value.
  - `next_rebilling_date` string, date-time — The UTC date and time of the next rebill for the subscription
  - `total_failed_charges` integer — The number of unsuccessful charges for this subscription
  - `subscription_interval` 'days' | 'weekly' | 'monthly' | 'quarterly' | 'yearly' — The billing interval for the subscription
  - `stripe_plan_id` string, nullable — The Stripe plan ID associated with this subscription

## Other responses

- `404` — Subscription could not be found
- `409` — Subscription could not be canceled because it was either already canceled, scheduled to be canceled, or not active

---

[API](https://skmtc.dev/samcart/apis/samcart-public-api.md) · [All operations](https://skmtc.dev/samcart/apis/samcart-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/samcart/samcart-public-api/revisions/80296f7a00d0/schema)
