# Autopay: charge a customer's card automatically

Save a customer's card the first time they pay and let Commerce charge it for every later invoice and dated installment, with retries, update-card emails and clear status on each record.

Source: https://support.rework.com/article/commerce-autopay

> **In plain words:** **Autopay** means Commerce charges the customer's saved card by itself, so nobody has to open a pay link each time. The card is saved while the customer makes their first payment, on a quote, an order or an invoice, so there is no separate "save your card" step. Read this page to know when the option appears, what the customer sees, when money is taken and what happens when a card is declined. New to Commerce terms? See [Commerce basics](https://support.rework.com/article/commerce-basics).

**Where to find it:** the **Charge automatically** choice sits under **Collection** in the payment step of a quote or an order. After a deal becomes a subscription, the card shows in the right column of the subscription page and in its **Automatic payment** section. **Who can use it:** people who can edit the quote, order or subscription. An admin connects a card gateway once (see below).

## Words used on this page

- **Saved card:** the card the customer allowed you to charge again. The payment provider keeps it, never Commerce.
  
- **Cycle invoice:** the invoice Commerce creates for each billing period of a subscription. See [Subscriptions](https://support.rework.com/article/commerce-subscriptions-overview).
  
- **Dated installment:** a row of a payment schedule that has a real due date, for example "Balance, 30 days after acceptance". A row with no date waits for a milestone and keeps sending a payment link.
  
- **Due date:** the day an invoice or installment should be paid by. Autopay charges on or just after it.
  

## When the option appears

**Charge automatically** is offered on a quote or an order when the deal has something to charge later:

- at least one **recurring line** (a plan, a monthly fee, and so on), even when the same deal also has one-time lines such as a setup fee, or
  
- a **custom payment schedule** with at least one dated installment after the first.
  

For a new quote or order made by your team, **Charge automatically** is already selected when the deal qualifies. Your own click on **Send invoice**, **Charge automatically** or another choice always wins, and a deal you saved earlier is never switched for you.

If it cannot be picked, the option is greyed out and a sentence under it says why:

| 
What you read

 | 

What to do

 |
| --- | --- |
| 

Connect a payment service on the invoice book first.

 | 

An admin picks a payment processor on the invoice service. See [Invoice service settings](https://support.rework.com/article/commerce-invoice-service-settings).

 |
| 

Connect a gateway that can save cards (for example Stripe) to charge automatically.

 | 

An admin ticks a card gateway on the payment service. See [Payment service settings](https://support.rework.com/article/commerce-payment-service-settings).

 |
| 

None of your card gateways takes the deal's currency.

 | 

Pick a deal currency your card gateway accepts, or connect one that does.

 |

## Which gateways can save a card

| 
Gateway

 | 

What is saved

 |
| --- | --- |
| 

Stripe

 | 

Cards. See [Connect Stripe](https://support.rework.com/article/commerce-connect-stripe).

 |
| 

PayPal

 | 

The buyer's PayPal. Works with the accounts connected using your own API keys.

 |
| 

MoMo

 | 

The buyer's MoMo wallet. The checkout needs the buyer's phone number.

 |
| 

ZaloPay

 | 

The buyer's ZaloPay wallet.

 |
| 

HitPay

 | 

Cards. Works with the accounts connected using your own API keys.

 |
| 

Billplz

 | 

The buyer's bank agreement.

 |
| 

Foxpay

 | 

Cards from abroad (international cards). A payment with another method in the same checkout is paid once and nothing is saved.

 |

Bank transfer and the gateways not listed take a payment one time, so the customer keeps paying each link.

## How the card gets saved

1. In the payment step of a quote or an order, keep **Charge automatically** selected under **Collection**. A note says "The customer's card is saved when they pay, and later invoices are charged to it automatically." For a payment schedule it reads "...and the later installments are charged to it on their due dates."
   
2. Send the quote or order as usual. The customer opens the link and pays.
   
3. On the pay page, a line above the button says what they agree to, for example "By paying, you allow Northwind Analytics to save this payment method and charge it automatically for each monthly invoice of Quote Q-1042." It names you and the deal and shows no amount. Paying is the agreement, so there is no checkbox to untick.
   
4. The payment goes through and the card is saved with it. Nothing else is asked of the customer.
   

On a quote or an order the card is held there until the deal is converted. The record shows **Charges automatically** with the card's brand and last four digits, and a note "Card saved here moves to the subscription when you convert."

When you convert the quote or order to a subscription, the card moves to the subscription and the subscription is set to charge automatically. If the card's gateway is not one of the subscription's own gateways, the card is not used: the dialog tells you, and the invoices wait until the customer adds a card.

A card can also be saved while the customer pays a cycle invoice, an invoice cut from the deal, or a hand-made subscription's first invoice. A subscription you create yourself starts with automatic collection on when its payment chain can hold a card.

## Where you see it

- **Subscription page, right column:** the **Automatic payment** card with the saved card (brand, last four digits and expiry) or **No card on file**, **Charged automatically at the due date** or **Invoice-led: pay link or transfer**, the next charge date, and the buttons **Charge automatically** or **Stop auto-charging**, **Copy customer's update link** and **Remove card**.
  
- **Subscription editor, Collection step:** the **Automatic payment** section with a **Charge automatically** switch. When it is off, the note reads "Every invoice carries a pay link and the customer pays it themselves."
  
- **Subscriptions list:** the **No card on file** filter lists automatic subscriptions that have no card yet.
  
- **Each invoice:** an **Autopay** block shows the state, for example "Will be charged automatically on 16 Mar", "The last charge failed. Trying again on 18 Mar", "Waiting for a payment method", "Payment is processing" or "Paid automatically".
  

## When the money is taken

Commerce never charges when an invoice is created. It charges when the invoice is due.

- A check runs every hour. For each issued, unpaid invoice that has reached its due date and whose subscription has a card and automatic collection on, it charges the card for the amount due now.
  
- A cycle invoice with a payment plan is charged installment by installment, each on its own date. See [Payment plans](https://support.rework.com/article/commerce-payment-plans).
  
- On a quote, an order or an invoice with a custom schedule, each dated installment after the first is charged to the saved card on its due date, and the installment is marked paid. Three days before, the customer gets an email saying how much will be charged and when.
  
- A successful charge records a payment on the invoice or installment, which then shows as paid.
  

The due date comes from the payment terms, for example **Net 15**. See [Create a subscription](https://support.rework.com/article/commerce-create-subscription).

## If a charge fails

Commerce keeps trying before it gives up. Attempts happen on the due date, then 1, 3 and 7 days after it: four in all.

- **The card is declined** (not enough funds, for example): the next attempt runs on the next date. The customer gets an email after the first and the second failure, and a last one after the final failure. Each email has a link to update the card.
  
- **The bank asks the customer to confirm, or the card was removed:** the charge is not repeated until the customer fixes the card. They are asked for a new one by email and on the invoice page.
  
- **A charge is still processing at the provider:** the invoice shows **Payment is processing** and is settled when the provider confirms. It is never charged twice.
  

After the last attempt, the invoice **waits for a payment method**. The subscription stays on automatic collection, and the overdue reminder emails do not take over. You can still send the customer a pay link by hand. As soon as a card is added to that subscription, every waiting invoice gets a fresh set of attempts within the hour.

A card that is close to its expiry date triggers an email to the customer once a month, asking them to update it.

If the customer disputes a charge with their bank, Commerce records the dispute on the invoice and tells the owners with a bell notice. It changes nothing else: the card stays and later invoices are still charged. Whether to refund, answer the bank or stop the subscription is your decision.

> **Important:** Overdue reminder emails never chase an invoice that is on automatic collection. If you want a human follow-up, send the customer a pay link by hand.

## Worked example

Northwind Analytics sells a Team plan to Bluebird Bakery at 49 per month, plus a one-time setup fee of 100. The quote has a recurring line, so **Charge automatically** is already selected. Terms are **Net 15**.

| 
Date

 | 

What happens

 |
| --- | --- |
| 

26 Feb

 | 

You send the quote. Bluebird Bakery accepts and pays the first invoice by card. The pay page said the card would be saved.

 |
| 

27 Feb

 | 

You convert the quote to a subscription. The card moves to it and collection is automatic.

 |
| 

1 Apr

 | 

Cycle 2 is invoiced for 49 and emailed. The due date is 16 Apr.

 |
| 

16 Apr

 | 

The hourly check charges the card. It is declined. The customer is emailed with an update-card link.

 |
| 

17 Apr

 | 

The second attempt succeeds. The invoice shows **Paid automatically**.

 |

If all four attempts had failed, cycle 2 would show **Waiting for a payment method**. When Bluebird Bakery adds a new card, the invoice is charged again within the hour.

## Ask for, stop, remove or replace a card

- **Stop auto-charging** keeps the card on file and returns the subscription to pay links. Click **Charge automatically** to start again.
  
- **Remove card** asks "Remove this card?". The card is removed at the provider and collection stays automatic: invoices wait until the customer adds a new card, and they are asked by email and on the invoice page.
  
- **Ask for a card or replace one:** with **Charge automatically** on, click **Copy customer's update link** in the card on the subscription and send it to the customer. They add or replace the card on a secure page and nothing is charged. They can also pay any open invoice with a new card, or use the update link in a failure email. The new card replaces the old one.
  
- A quote or order that holds a card and is canceled releases the card at the provider.
  
- **The card changes at the provider.** With Stripe, Commerce charges the customer's default card in Stripe: if a new default card is set there, the next charges use it, and if the saved card is removed with no other card left, the invoices wait for a new one. With PayPal and the other gateways, a method the customer removes there is treated like **Remove card**: invoices wait and the customer is asked for a new card by email. Stripe and PayPal tell Commerce at once when their webhook events are set up (see [Connect Stripe](https://support.rework.com/article/commerce-connect-stripe) and [Connect PayPal](https://support.rework.com/article/commerce-connect-paypal)). Commerce also checks every saved card with its provider once a month, and a charge that fails because the card is gone stops at once instead of retrying.
  

## Troubleshooting

| 
Problem

 | 

Why it happens

 | 

What to do

 |
| --- | --- | --- |
| 

**Charge automatically** is greyed out.

 | 

The deal has no recurring line and no dated installment, or the payment chain cannot hold a card.

 | 

Read the sentence under the option. Add a recurring line or a dated installment, or ask an admin to connect a card gateway.

 |
| 

Nothing was charged although the subscription shows a card.

 | 

The invoice is still a draft, **Charge automatically** is off, or the due date has not come.

 | 

Check **When a cycle comes due** issues invoices (see [Subscription service settings](https://support.rework.com/article/commerce-subscription-service-settings)), that the card reads "Charged automatically at the due date", and the due date.

 |
| 

The invoice says **Waiting for a payment method**.

 | 

The card was declined on every attempt, was removed, or the customer never paid with a card.

 | 

Click **Copy customer's update link** on the subscription and send it, or wait for the update-card email to be used. Once a card is added the invoice is charged again.

 |
| 

The Convert dialog says the saved card cannot be used.

 | 

The card's gateway is not on the subscription's own payment chain.

 | 

Add that gateway to the subscription service's payment service, or let the customer add a card on the first subscription invoice.

 |
| 

A payment shows as "A charge needs to be reconciled by hand".

 | 

The provider took a charge Commerce could not match to the invoice.

 | 

Open the invoice, check the provider's dashboard and record or refund the payment. Autopay will not touch that invoice again.

 |
| 

The customer got an invoice email with a pay link and asks if they will be charged twice.

 | 

The email is the invoice itself.

 | 

No. If they pay the link first, the invoice is paid and autopay skips it.

 |
