# Manage autopay

Autopay is the process of automatically collecting payment from a customer.
The payment is collected on the renewal date of an order that contains subscription items.
If autopay is activated, the default payment instrument that is set on the order is used.
If a default payment instrument is not set on the order, the customer's default payment instrument is used.
If a default payment instrument that is set on the order is inactive, the customer's default payment instrument is used.

The autopay schedule sets multiple retries for orders that contain subscription items that fail to bill successfully.
The schedule also specifies if the order must be canceled after the last attempt.

## Activate autopay

Use this process to activate autopay on an order that contains subscription items.
Set a default payment instrument, or set the length of time after which an unpaid order is canceled.
If autopay is deactivated, you must process the payment manually.

1. [Log in](https://app-sandbox.rebilly.com/login) to Rebilly.
2. In the left navigation bar, press **Data tables**, then press **Billing**.
3. Select one of the following segments: **Active orders**, **Canceled orders**, **Paid invoice**, **Refunded invoices**, or **Unpaid invoices**.
4. In the **ID** or **Invoice number** column, press a number.
5. In the top right of the page, press **Edit**.
6. Select from the following:

  **Activate autopay**

  Select the **Autopay** checkbox.

  **Activate delinquency period**

  To specify the length of time after which an order that contains subscription items is canceled if it is not paid:

    1. Select the **Activate delinquency period** checkbox.
    2. Specify the length of time after which the order that contains subscription items is canceled if it is not paid.
  **Set a default payment instrument for autopay**

  Select an instrument from the **Default payment instrument** dropdown.
  A default payment instrument takes precedence over the customer's primary payment.
7. Press **Save**.

## Create an autopay schedule

Use this process to set or edit multiple retries for orders that contain subscription items that fail to bill successfully.
You can also schedule discounts or partial payments for each retry attempt.

1. [Log in](https://app-sandbox.rebilly.com/login) to Rebilly.
2. In the left navigation bar, press **Data tables**, then press **Billing**.
3. Press **Unpaid invoices**, **Paid invoices**, or **Refunded invoices**.
4. In the **ID** or **Invoice number** column, press an order that contains subscription items.
5. Under **Autopay schedule**, press the link.
6. Press the date picker and set when the next payment is automatically collected.
7. In the **Retry attempts** section, press **Add attempt**, and set the schedule.
  To add more attempts, press **Add attempt** and set the schedule.
8. In the **After a declined attempt** section, select the **Push renewal time forward** checkbox.
  This moves the renewal time into the future after each retry attempt.
  If this option is not set, the next rebill may occur during the retry schedule of the current rebill.
9. In the **After the last failed attempt** section, select an option:
    - **Cancel order**: Cancels the order that contains subscription items after the last attempt.
    - **Abandon invoice**: Abandons the invoice after the last attempt.
      Abandoning the invoice returns unused credit.
      Ending retries without this option leaves credit allocated.
10. Press **Update autopay**.

## Edit an autopay schedule

Use autopay to schedule multiple retries for orders that contain subscription items that fail to bill successfully.
You can also use autopay to cancel the order after the last attempt.

1. [Log in](https://app-sandbox.rebilly.com/login) to Rebilly.
2. In the left navigation bar, press **Data tables**, then press **Billing**.
3. Press **Unpaid invoices**, **Paid invoices**, or **Refunded invoices**.
4. In the **ID** or **Invoice number** column, press an order that contains subscription items.
5. Under **Autopay schedule**, press the link.
6. Press the date picker and set when the next payment is automatically collected.
7. In the **Retry attempts** section, press **Add attempt**, and set the schedule.
  To add more attempts, press **Add attempt** and set the schedule.
8. In the **After a declined attempt** section, select the **Push renewal time forward** checkbox.
  This moves the renewal time into the future after each retry attempt.
  If this option is not set, the next rebill may occur during the retry schedule of the current rebill.
9. In the **After the last failed attempt** section, select an option:

    - **Cancel order**: Cancels the order that contains subscription items after the last attempt.
    - **Abandon invoice**: Abandons the invoice after the last attempt.
      Abandoning the invoice returns unused credit.
      Ending retries without this option leaves credit allocated.
10. Press **Update autopay**.
