Skip to content

Using Grace Period Manager

After the setup in Configuration there is nothing to do day to day. This page explains what happens automatically.

How it works

Paymenter suspends overdue services in its app:cron-job command, which the scheduler runs once a day at Paymenter's Cron Job Time. The extension does not suspend anything itself. It does this instead:

  1. When app:cron-job starts, the extension becomes active.
  2. On the first service query of the run it builds a list of protected services:
    • every service with the status active whose due date (expires_at) is not older than its grace period,
    • every service with an exemption whose Do not auto-suspend this service toggle is on.
  3. For the rest of the run, protected services are left out of every service query the cron job makes.
  4. When app:cron-job finishes, the extension becomes inactive again.

Outside that command the extension changes nothing. Admin lists, customer pages and other commands see all services.

Which grace period applies

  • If the service's product has an entry under Grace Periods, that number of days applies.
  • Otherwise Default grace period (days) applies.

When a service is suspended

The grace period ends at due date plus grace days, to the minute. The cron job runs once a day, so the suspension happens at the first run after that moment.

Paymenter's own setting Suspend server if invoice is x days overdue (default 2) still applies. Both count from the due date, and both must have passed:

Grace period Paymenter setting Service is suspended at the first cron run after
7 days 2 days due date + 7 days
3 days 2 days due date + 3 days
1 day 2 days due date + 2 days
0 days 2 days due date + 2 days

To make a grace period shorter than Paymenter's setting take effect, lower Paymenter's setting to your shortest grace period.

The suspension itself is Paymenter's: the service status becomes suspended and your server extension is told to suspend the server, as for any other overdue service.

A service that pays in time is renewed by Paymenter, its due date moves forward and it is never suspended.

Warning

Paymenter's termination step is not delayed. It terminates suspended services whose due date is older than Delete server if invoice is x days overdue (also cancels the invoice) (default 14), and it runs right after the suspension step. With a grace period equal to or higher than that value, a service is suspended and terminated in the same cron run. Keep every grace period lower than the termination setting.

What the cron job no longer sees

Protected services are hidden from the whole cron job, not only from the suspension step. The list of protected services includes every active service that is not yet due, because its due date is "not older than the grace period". This is also true with a grace period of 0.

Paymenter's cron job uses service queries in these steps, and each one is affected:

Cron job step Effect while the extension is enabled
Create renewal invoices for active services whose due date is at most Send invoice if due date is x days away days ahead (default 7) Active services inside their grace period are skipped, and that includes services that are not due yet. The cron job creates the renewal invoice only at the first run after due date plus grace days. Renewals of free services and charges of billing agreements happen in the same step and are delayed in the same way.
Cancel pending orders whose first invoice is unpaid Unchanged, except for exempt services, which are skipped.
Suspend overdue active services Skipped for services inside their grace period and for exempt services. This is the purpose of the extension.
Terminate suspended services Unchanged, except for exempt services, which are skipped.

Warning

With the extension enabled, the cron job does not create a renewal invoice before the due date. It creates it once the grace period has passed. If the grace period is at least as long as Paymenter's Suspend server if invoice is x days overdue value, the invoice is created and the service is suspended in the same cron run. Test this on your installation before you rely on it, and check how your customers get and pay their renewal invoices.

Exempt services

A service with an active exemption is hidden from the cron job in every status. For as long as the exemption is on, the cron job:

  • does not suspend it,
  • does not create renewal invoices for it,
  • does not terminate it if it is already suspended,
  • does not cancel it if it is a pending order with an unpaid first invoice.

An exemption does not unsuspend a service that is already suspended.

When you switch the exemption off or delete it, the service is handled by the next cron run like any other. If it is overdue beyond its grace period and Paymenter's setting by then, it is suspended in that run.

Reading the suspension date

The Suspension date column under Suspension Exemptions shows due date plus grace period for the services listed there. Keep in mind:

  • It is calculated when the page loads. It changes when the due date, the product override or the global default changes.
  • It does not include Paymenter's Suspend server if invoice is x days overdue setting. If that is longer than the grace period, the real suspension is later.
  • For an exempt service it is the date that would apply without the exemption.
  • The cron job runs once a day, so the suspension happens at the first run after that date.

The extension shows the suspension date only in this list. There is no such column for other services.

What the customer sees

Nothing from the extension. It adds no customer pages, no notices on the service page and no e-mails. The customer's service stays active during the grace period, and the e-mails the customer gets are the ones Paymenter sends.

Manual actions

The extension is only active while app:cron-job runs. Suspending or unsuspending a service by hand in the admin area works at any time, also during the grace period and for exempt services.