Skip to content

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.

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.

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 and Configuration.

The flow at a glance

StageWhat happens
First invoiceThe customer pays on PayGlocal's hosted checkout and authorises a mandate
Mandate storedThe verified callback saves the mandate for that client
Subsequent invoicesThe daily cron auto-charges eligible unpaid invoices via the SI Sale API
Client deletedDeleting 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

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.

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 (15 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):

StatusWhat it means
activeThe current, usable authorisation — what the cron charges
revokedCancelled at PayGlocal; no longer chargeable
exhaustedReached the end of its usable life
failedThe authorisation did not complete successfully
supersededReplaced 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.

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.

Documentation for the Relyweb app catalogue.