> For the complete documentation index, see [llms.txt](https://docs.rafflex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rafflex.io/additional-settings/safe-play-setting/spending-limits-at-checkout.md).

# Spending Limits at Checkout

How a customer's Safe Play spending limit is measured at the checkout, what counts towards it, and why a purchase might be blocked.

When a customer sets a spending limit through [Safe Play](/additional-settings/safe-play-setting.md), or you set one for them from their customer page, Rafflex checks it every time they try to pay by card or PayPal, or top up their wallet. If a purchase would take them over their limit, it is stopped with a clear on-screen message. This page explains what counts, how the period is measured, and why a customer might occasionally be told they are at their limit when they think they should not be.

***

### How the period is measured

A customer's spend is totalled over a fixed calendar period, not a rolling window counted from the day they set the limit.

| Duration      | Spend is counted from                                     |
| ------------- | --------------------------------------------------------- |
| **Per Week**  | The start of the current week. Weeks start on **Monday**. |
| **Per Month** | The **1st** of the current month.                         |
| **Per Year**  | **1 January** of the current year.                        |

At the start of each new period the running total starts again from zero, so the customer's allowance refreshes on Monday, on the 1st, or on 1 January, depending on the duration they chose.

{% hint style="info" %}
**This is the question customers ask most.** A weekly limit set on a Friday still refreshes the following Monday, not seven days later. A monthly limit set on the 28th still refreshes on the 1st. The limit follows the calendar, so it can refresh sooner than someone expecting a rolling seven or thirty day window would assume.
{% endhint %}

{% hint style="info" %}
**Spending earlier in the period still counts.** The total includes everything spent since the start of the current week, month or year, even if it was spent before the limit was set. For example, a customer who spent £40 on Tuesday and then sets a £50 weekly limit on Wednesday has £10 left to spend until Monday.
{% endhint %}

***

### What counts towards the limit

A spending limit is about real money leaving the customer's bank, so it counts the moment money actually changes hands.

* **Card and PayPal payments count.** Any order paid for by card or with PayPal adds to the total.
* **Topping up wallet credit counts.** When a customer adds money to their wallet, that money is counted straight away, because that is the moment it leaves their bank.
* **Paying with existing wallet credit does not count.** If a customer pays for an order using credit already sitting in their wallet, it is not counted again. That money was already counted when it was added to the wallet, so counting it a second time would be double counting.

{% hint style="success" %}
**A wallet top up is only ever counted once.** A customer who tops up their wallet and later spends that credit sees the top up count towards their limit one time, at the point they topped up, and never again when they spend it.
{% endhint %}

To learn more about how wallet credit works, see [Site Credit & Wallets](/additional-settings/site-credit-and-wallets.md).

***

### What happens at checkout

Before a card or PayPal order, or a wallet top up, is taken, Rafflex compares the customer's spend so far in the period with their limit. The customer sees one of these messages if the purchase cannot go ahead (the word "weekly" changes to "monthly" or "yearly" to match their limit):

| Situation                                      | What the customer sees                                                                                                                                  |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The order **would push them over** their limit | "Your weekly spending limit would be exceeded if you were to make this order. Reduce order size."                                                       |
| The limit has **already been reached**         | "Your weekly spending limit has been reached." followed by a note that pending orders are included in the limit until they are automatically cancelled. |
| The customer has chosen **Disable Account**    | "Your account is disabled."                                                                                                                             |

The same checks apply to wallet top ups as well as to ordering tickets, so a customer cannot get around a limit by topping up instead of buying directly.

{% hint style="info" %}
**A limit of zero.** Customers can set a limit of **0**. Their limit is then always treated as reached, so every card or PayPal purchase and every wallet top up is stopped with the "has been reached" message.
{% endhint %}

***

### Pending orders and the short hold

When working out how much a customer has already spent, Rafflex counts both completed orders and orders that are still waiting to be paid (pending orders). An order a customer has started but not yet finished paying for still counts against their allowance.

Pending orders keep counting until they are automatically cancelled a short while after the order was started. Once an abandoned order is cancelled, the allowance it was holding frees back up.

{% hint style="warning" %}
**A customer who abandons a checkout and immediately tries again may briefly be told they are at their limit.** Their previous unfinished attempt is still being counted until it clears. They have two easy options: wait a little while for the abandoned order to be cancelled automatically, or simply complete the original order. The on-screen message tells them pending orders are included until they are automatically cancelled, so customers are not left guessing.
{% endhint %}

***

### Disabled accounts

Safe Play is also what enforces a self-imposed account block. If a customer has chosen **Disable Account** on their **Play Safe** page (or you have set **Disabled Account** for them), card and PayPal checkout and wallet top ups are stopped with the message "Your account is disabled." This is intentional and is part of giving customers control over their own play.

This is different from a **timeout**. A customer in a timeout cannot open your competition pages or the checkout at all. For more on timeouts and the other protections available, see [Player Protections](/standards/player-protections.md).

***

### Relaxing a limit

A customer can lower a limit (keeping the same duration) and it takes effect straight away. Increasing a limit, removing it, or changing how often it applies is subject to a cooling off period that you set as the operator. That waiting period is explained in full on the [Safe Play Setting](/additional-settings/safe-play-setting.md) page under **Spend Limit Cooldown (Hours)**.

Changes you make as an admin from the customer's **Spending Limit** tab apply straight away, without a cooling off period.

{% hint style="success" %}
**Most blocked purchases are not a fault.** They mean Safe Play is doing its job. If a customer is confused about why a purchase was stopped, walk them through the calendar reset and the short pending hold above, and the picture usually becomes clear.
{% endhint %}
