Wix Stores: How to turn off auto-charging on subscriptions?

Hey all,

We are currently selling a product using Wix Stores as auto-ship only via the subscription. We’d like to be able to turn the automatic charging off, and send invoices manually to our customers since the product is quite flexible and we work directly with most of our customers. Is there a way to be able to turn off the customer’s auto-charge for subscriptions, but keep everything else active?

There isn’t a setting for this. Wix won’t let you sell a product subscription at all without a payment provider that supports recurring payments, and the customer’s stored card is what the subscription runs on. The levers on an existing one are skip (10 cycles maximum, and skipped orders are regenerated later, so a 12 month subscription still bills 12 times), reschedule, and cancel.

The format also works against the flexibility you mention: changes to a subscription only affect new purchases, so for a customer already on an indefinitely auto-renewing subscription you can’t change the price, tax or shipping rate.

You can keep the rest of it by selling the product as a one-time purchase and running the cycle off an invoice. In Invoices, Create New > Invoice & Order creates a store order alongside the invoice, and the order appears in your Orders tab once the customer pays, so the way you fulfill orders doesn’t change.

For the cadence there’s a Recurring Invoices section in the dashboard, weekly through yearly. Check whether it collects on its own once a card is on file before you rely on it, because it wants a recurring-capable provider and it has grace periods and automatic retries.

If you’d rather see each invoice before it goes out, a scheduled job can draft them and leave them unsent. The schedule goes in backend/jobs.config:

{
    "jobs": [
        {
            "functionLocation": "/billing.js",
            "functionName": "createDueInvoices",
            "executionConfig": { "time": "06:00" }
        }
    ]
}

The job itself reads a collection holding one row per customer (contactId, email, productName, unitPrice, quantity, intervalDays, nextInvoiceDate, status) and drafts an invoice for each row that’s due:

import wixData from 'wix-data';
import { invoices } from 'wix-billing-backend';

const DAY_MS = 24 * 60 * 60 * 1000;

export async function createDueInvoices() {
    const now = new Date();
    const { items } = await wixData.query('BillingPlans')
        .eq('status', 'active')
        .le('nextInvoiceDate', now)
        .find({ suppressAuth: true });

    for (const plan of items) {
        const created = await invoices.createInvoice({
            title: plan.title,
            currency: 'USD',
            customer: { contactId: plan.contactId, email: plan.email },
            lineItems: [{
                id: '1',
                name: plan.productName,
                price: plan.unitPrice,
                quantity: plan.quantity
            }],
            dates: {
                issueDate: now,
                dueDate: new Date(now.getTime() + 14 * DAY_MS)
            }
        });

        plan.lastInvoiceId = created.id.id;
        plan.nextInvoiceDate = new Date(now.getTime() + plan.intervalDays * DAY_MS);
        await wixData.update('BillingPlans', plan, { suppressAuth: true });
    }
}

That creates the invoice and stops, so each one waits in Invoices for you to adjust and send. Since the job makes a plain invoice rather than an Invoice & Order, use backend/events.js for the ship signal:

export async function wixBilling_onInvoicePaid(event) {
    // look up the row by event.id.id and mark it ready to ship
}

Three things will catch you out on a first test: the contact ID and email on the invoice have to match a contact that already exists in your contact list, job times in jobs.config are UTC, and backend events don’t fire in Preview, so the site has to be published.

I haven’t run this on a live site with Invoices payments connected, so treat the code as a starting point, not something already proven.