> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revolv3.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Canceling a Subscription

> Learn how to cancel customer subscriptions, understand immediate vs end-of-cycle cancellation, and handle refunds for canceled subscriptions.

## What is Subscription Cancellation?

**Canceling a subscription** stops all future billing cycles. Once canceled, the customer won't be charged again, but past charges remain (unless you issue refunds separately).

**When customers cancel:**

* They want to stop the service
* They found a better alternative
* They can't afford it anymore
* They're dissatisfied with the service

**What cancellation does:**

* ✅ Stops future automatic charges
* ✅ Prevents new invoices from being generated
* ✅ Preserves history (past invoices and payments remain in the system)
* ✅ Updates subscription status to "Cancelled"
* ✅ Takes effect immediately
* ❌ Does NOT refund past payments (you must do that separately)
* ❌ Does NOT cancel the current billing period (customer keeps access until the period ends unless you handle it separately)
* ❌ Does NOT delete data (subscription and invoice history remains)

## API Endpoint

```
POST {{Api Root}}/api/Subscriptions/{subscriptionId}/cancel
```

Replace:

* `{{Api Root}}` with `api.revolv3.com` (production) or `api-sandbox.revolv3.com` (sandbox)
* `{subscriptionId}` with the actual subscription ID you want to cancel

**No request body required**—just send a POST request to the endpoint.

### Example Request

```bash theme={null}
POST {{Api Root}}/api/Subscriptions/2232/cancel
```

No payload needed—the subscription ID in the URL is sufficient.

## Cancellation Response

When you successfully cancel a subscription, you'll get a confirmation:

```json theme={null}
{
  "subscriptionId": 2232,
  "customerId": 6684,
  "subscriptionStatus": "Cancelled",
  "cancelledAt": "2024-07-11T18:16:33.8785322Z"
}
```

### Understanding the Response

| Field                | Description                                                   |
| -------------------- | ------------------------------------------------------------- |
| `subscriptionId`     | The subscription that was canceled (confirms which one)       |
| `customerId`         | The customer associated with this subscription                |
| `subscriptionStatus` | Will be `"Cancelled"` to confirm cancellation                 |
| `cancelledAt`        | Timestamp when the cancellation took effect (ISO 8601 format) |

## Important Notes About Cancellation

### If You Need to Refund

Cancellation and refunds are separate operations:

1. **Cancel the subscription** (stops future charges)
2. **Issue refunds separately** if needed (use the [Refunds API](/docs/integration-flows/refunds))

**Example**: If a customer cancels mid-month and you want to refund the unused portion:

1. Cancel the subscription
2. Calculate the prorated refund amount
3. Issue a refund for that amount

## Real-World Scenarios

### Scenario 1: Customer Cancels, No Refund

**Situation**: Customer cancels subscription, has already paid for current month, no refund needed

**Solution**:

1. Cancel subscription via API
2. Customer keeps access until period ends
3. No further charges

**Code**:

```bash theme={null}
POST {{Api Root}}/api/Subscriptions/2232/cancel
```

### Scenario 2: Customer Cancels, Prorated Refund

**Situation**: Customer cancels mid-month, you want to refund unused portion

**Solution**:

1. Cancel subscription
2. Calculate prorated amount (e.g., 15 days unused out of 30)
3. Issue partial refund for that amount

**Code**:

```bash theme={null}
# Step 1: Cancel
POST {{Api Root}}/api/Subscriptions/2232/cancel

# Step 2: Refund (separate call)
POST {{Api Root}}/api/Invoices/{invoiceId}/refund
{
  "amount": 14.99  // Prorated amount
}
```

### Scenario 3: Customer Requests Immediate Cancellation

**Situation**: Customer wants to cancel immediately and get a full refund for current period

**Solution**:

1. Cancel subscription (stops future charges)
2. Issue full refund for current period's invoice
3. Revoke access immediately (in your application)

## Best Practices

1. **Cancel before refunding**: Cancel the subscription first, then handle refunds
2. **Store cancellation reason**: Log why customers cancel (in your system, not Revolv3)
3. **Handle gracefully**: Show a friendly cancellation confirmation
4. **Offer alternatives**: Consider offering pause or discount instead of cancellation
5. **Follow up**: Send a cancellation confirmation email

## Common Questions

**Q: Can I undo a cancellation?**

A: No, cancellations are permanent. You'd need to create a new subscription if the customer wants to resume.

**Q: What happens to pending invoices?**

A: Pending invoices remain in the system. They won't be automatically processed after cancellation, but you may want to cancel or void them separately.

**Q: Can I cancel and refund in one call?**

A: No, they're separate operations. Cancel first, then issue refunds separately.

**Q: What if the customer wants to resume later?**

A: Create a new subscription. The old one stays canceled.

**Q: Does cancellation affect past invoices?**

A: No, past invoices remain unchanged. Only future billing stops.

## Next Steps

* **[Refunds](/docs/integration-flows/refunds)** — Learn how to issue refunds for canceled subscriptions
* **[Create a Subscription](/docs/core-concepts/subscription/create-subscription)** — Understand how subscriptions work
* **[Get Invoice Details](/docs/core-concepts/invoice/get-details-of-invoice-attempts)** — Find invoices to refund after cancellation

***
