# Manage autopay

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

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

## Activate autopay

Use this process to activate autopay on a subscription, set a default payment instrument, or set the length of time after which an unpaid subscription 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 subscriptions**, **Canceled subscriptions**, **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:
Select the **Autopay** checkbox.
To specify the length of time after which a subscription is canceled if it is not paid:
  1. Select the **Activate delinquency period** checkbox.
  2. Specify the length of time after which the subscription is canceled if it is not paid.

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 subscriptions 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 a subscription.
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 subscription**: Cancels the subscription after the last attempt.
  - **Abandon invoice**: Abandons the invoice after the last attempt.
10. Press **Update autopay**.


## Edit an autopay schedule

Use autopay to schedule multiple retries for subscriptions that fail to bill successfully.
You can also use autopay to cancel the subscription 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 a subscription.
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 subscription**: Cancels the subscription after the last attempt.
  - **Abandon invoice**: Abandons the invoice after the last attempt.
10. Press **Update autopay**.