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

# Canceling AutoBills with Reason Codes

Subscribe provides a mechanism to store and track the reason an AutoBill is put into a final or terminal state. Cancel reasons are codes mapped to text descriptions. You can apply one code to each AutoBill. Subscribe supports three kinds of cancel reasons:

* Subscribe Reserved Codes—codes (0 through 99—currently only 0 through 5 are used) predefined by Vindicia and used by Subscribe to cancel or terminate a subscription
* Predefined Merchant Codes—commonly used codes (100 through 999—currently only 100 through 107 are used) predefined by Vindicia that you can apply to AutoBills you cancel
* Custom-Defined Merchant Codes—codes (1000 and above) that you can define and submit in advance, and use when you cancel AutoBills. Custom cancel reason codes you define can be an alphanumeric string of up to 16 characters—for example: `1001` or `N500` or `End_Refund`.The description can be a string of up to 255 characters

The following table lists `Subscribe Reserved Codes`, `Predefined Merchant Codes`, and the numerical ranges reserved by Vindicia for future use, and for `Custom-Defined Merchant Codes` you create.

| ReasonCode | Description |
| - | - |
| `0` | Vindicia: Administrative Action. |
| `1` | CasBox: Unspecified. |
| `2` | Subscribe: AutoBill Ended. |
| `3` | Subscribe: Account Updater reports card closed. |
| `4` | Subscribe: Chargeback received. Policy specifies AutoBill be cancelled. |
| `5` | Subscribe: Permanently Suspended for Non-Payment. Unable to Collect Payment. |
| `6 through 99` | Subscribe Reserved Codes, reserved for future extension by Vindicia. |
| `100` | Merchant: Terminated (Policy or Terms Violation). |
| `101` | Merchant: Prevent Auto-Renewal. |
| `102` | Merchant: Refunded, Cancel Service. |
| `103` | Merchant: Customer Dissatisfied. |
| `104` | Merchant: Technical Issues with Service. |
| `105` | Merchant: Unable/Unwilling to Pay (Cost too high). |
| `106` | Merchant: Generic Cancel (Other). |
| `107` | Merchant: Cancel Verifi. (Merchant uses Verifi to minimize chargebacks.) |
| `108 through 999` | Predefined Merchant Codes reserved for future extension by Vindicia. |
| 1000 and above. | Custom-Defined Merchant Codes that you can create. |

System-generated AutoBill cancellations are automatically assigned an applicable Subscribe Reserved Code. When you cancel an AutoBill with the `AutoBill.cancel` method, you can apply one of the Predefined Merchant Codes, or a Custom-Defined Merchant Code you have created (see [Creating Custom-Defined Merchant Cancel Reason Codes](Creating_Custom_Defined_)) to set the reason for the cancellation when it is submitted.

The following example shows how to call the `cancel` method to explicitly cancel an AutoBill and apply a cancel reason code.The cancel reason code in this example could be one of the Subscribe Reserved Codes or a Custom-Defined Merchant Code you have created.

```

$reasonCode = "103"; // unhappy user
$rc = $autobill->cancel($autobill, $disentitleFlag, $forceFlag, $settleFlag, $sendCancelNoticeFlag, $reasonCode);
```

**Parent topic:**[Canceling AutoBills](../topics/Canceling_AutoBills)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.