---
url: /payglocal-whmcs/features/recurring-payments.md
description: >-
  How PayGlocal Recurring collects renewals automatically — the customer
  authorises a mandate once, the daily cron charges eligible invoices via
  Standing Instructions, and one active mandate per client covers everything.
---

# How recurring payments work

The optional **PayGlocal Recurring** gateway collects renewals automatically. The customer
authorises a **mandate** during their first checkout, and the WHMCS daily cron charges eligible
future invoices against it via PayGlocal **Standing Instructions (SI)** — no re-entering card
details.

::: info Mandate, SI, KID
A **mandate** is the customer's standing authorisation for future charges. **SI** (Standing
Instruction) is PayGlocal's recurring-payment mechanism the mandate rides on — here it is
*merchant-initiated*: you charge as invoices fall due, up to the amount authorised. A **KID** is
the Key ID identifying one of your RSA keys.
:::

::: warning It builds on the main PayGlocal gateway
PayGlocal Recurring is a thin layer over the main **PayGlocal** module. It reads its license,
Merchant ID, RSA keys and test mode from the main **PayGlocal** gateway at runtime, so that
gateway must be **active and fully configured first**. Recurring also needs the **WHMCS daily
cron** running. See [Installation](/payglocal-whmcs/installation) and
[Configuration](/payglocal-whmcs/configuration).
:::

## The flow at a glance

| Stage | What happens |
| --- | --- |
| **First invoice** | The customer pays on PayGlocal's hosted checkout and authorises a mandate |
| **Mandate stored** | The verified callback saves the mandate for that client |
| **Subsequent invoices** | The daily cron auto-charges eligible unpaid invoices via the SI Sale API |
| **Client deleted** | Deleting the client in WHMCS revokes their mandate at PayGlocal automatically |

## One mandate per client, covering everything

* The mandate is stored **per client**, not per product or invoice — one authorisation covers
  hosting, domains, addons, one-off charges, whatever comes due.
* A client can have only **one active mandate at a time**. A new authorisation **supersedes** the
  old — the previous mandate is retired and the new one takes over all future charges.

## The amount guard {#amount-guard}

Before the daily cron charges an invoice, it compares the amount against the mandate's configured
maximum. **A charge above that maximum is skipped** — the customer is never billed more than they
agreed to.

You set the ceiling with **SI Maximum Amount Per Payment**, a multiple of the first invoice amount
(**1x** to **5x**, default **2x**).

> At **3x**, a first invoice of 100 USD allows later charges up to **300 USD**; anything above is
> left for you to handle manually.

::: tip Choosing a multiple
Renews one service → a low multiple is safest. Tends to bundle several services on one invoice →
give a little more headroom so legitimate charges aren't skipped.
:::

## When charges are attempted

The daily cron only charges an invoice that is all of:

* **Unpaid**, and assigned to the **PayGlocal Recurring** payment method;
* within the **Days Before Due Date to Charge** window (**1**–**5** days, default **2**); and
* **no more than 30 days overdue** — past that, the cron stops attempting it.

At **2 days**, an invoice due March 20 is processed on or after March 18. Customers can also pay
early from the invoice page.

## Mandate statuses

Reflected in the **Gateway Log** (**Utilities → Logs → Gateway Log**):

| Status | What it means |
| --- | --- |
| **active** | The current, usable authorisation — what the cron charges |
| **revoked** | Cancelled at PayGlocal; no longer chargeable |
| **exhausted** | Reached the end of its usable life |
| **failed** | The authorisation did not complete successfully |
| **superseded** | Replaced by a newer mandate the client authorised |

Stale mandates (inactive, exhausted, or not found at PayGlocal) are automatically deactivated so
the cron stops retrying, and the customer is prompted to authorise a new mandate on their next
invoice.

## What happens when you delete a client

Deleting a client in WHMCS **automatically revokes** their active mandate with PayGlocal — no
separate cleanup step.

::: warning Deactivating is not the same as deleting
Deactivating the gateway stops WHMCS's automated cron attempts, but does **not** cancel existing
mandates at PayGlocal. Deleting the client revokes the mandate automatically, or you can cancel it
directly in the PayGlocal dashboard.
:::

## Related pages

* [How payments work](/payglocal-whmcs/features/payment-flow) — the underlying PayCollect flow and verification
* [Configuration](/payglocal-whmcs/configuration) — set the SI Maximum Amount and Days Before Due fields
* [Settings reference](/payglocal-whmcs/settings) — the two SI options at a glance
* [Security](/payglocal-whmcs/features/security) — the guardrails behind every charge
* [Requirements](/payglocal-whmcs/requirements) — the daily cron and other prerequisites
