> ## Documentation Index
> Fetch the complete documentation index at: https://developers.perkstar.co.uk/llms.txt
> Use this file to discover all available pages before exploring further.

# Square

> Connect Square to Perkstar for customer-attributed earning, location-aware programme routing and matched refund corrections.

<img src="https://mintcdn.com/perkstar/kOq-krWNBeboioXf/assets/square-logo.svg?fit=max&auto=format&n=kOq-krWNBeboioXf&q=85&s=24e9d5d9b6583dfbc3c648f62d0f196f" alt="Square" width="54" height="54" data-path="assets/square-logo.svg" />

Use completed Square payments to reward customers who have already joined a
Perkstar programme. Staff attach the existing Square Customer before payment
with Square's normal customer search. On a tested compatible device, the
business can also enable optional Wallet QR identification so staff use
**Review sale → Add customer → scan icon** instead. Perkstar applies the routed
programme's earning rule and updates the member's Wallet pass.

Customers can redeem eligible rewards themselves from their pass and show staff
the live confirmation, or staff can use Perkstar Scanner. Staff then apply the
matching item or discount in Square; it is not applied automatically. See the
[redemption options and supported rewards](/integrations/square/earning-redemption#redeem-a-reward).

<Warning>
  Square is a **production beta** available to eligible Scale businesses through
  Perkstar's direct installer. The integration is not currently listed in the
  Square App Marketplace, but a Marketplace listing is not required to connect
  or use it.
</Warning>

<Note>
  A business can start Square earning with valid programme routing and Square's
  normal customer search. Optional Wallet QR device acceptance and the separate
  Perkstar redemption workflow are not prerequisites for connecting or earning.
</Note>

<CardGroup cols={3}>
  <Card title="Identify (optional)" icon="user-check">
    On a tested compatible device, identify a consenting member with one Wallet
    QR scan. Exact matching, consented profile creation and reference ownership
    all fail closed.
  </Card>

  <Card title="Earn" icon="sparkles">
    Route the Square location to an eligible Stamp, Points or Cashback programme
    and credit a completed payment exactly once.
  </Card>

  <Card title="Correct" icon="rotate-left">
    Full and partial refunds against the original Square payment reverse the
    corresponding Perkstar credit safely.
  </Card>
</CardGroup>

## System boundaries

Perkstar is the loyalty system of record. Square supplies merchant, location,
completed-payment, refund and attached-customer signals. In the standard
workflow, staff find and attach the Square Customer before payment; email or
phone must exactly match an existing member of the routed Perkstar programme.
If the business enables optional Wallet QR identification, current customer
consent gates every Square search, link and reference publication. For a
consenting customer, Perkstar may exact-match an existing Square Customer,
create one from their name and contact details only if no match exists, and put
that member's stable Wallet scan value in an otherwise empty Square Customer
`reference_id`.

**Square Loyalty is not required.** Perkstar never creates or updates Square
payments, loyalty balances or rewards, and it does not request Square Loyalty
permissions. Customer write access is used only for the optional identification
flow described above.

| Event | What Perkstar does |
| - | - |
| Staff finds and attaches a Square Customer | Uses the attached profile as transient matching input |
| Staff scans a prepared Wallet QR on a tested device | Square finds and attaches the linked Square Customer |
| Completed payment with an attached matched customer | Applies the selected programme's earning rule once |
| Anonymous payment | Ignores it because no customer can be identified |
| Attached customer who has not joined Perkstar | Discards the unmatched contact without retaining or enrolling it |
| Full or partial refund | Reverses the supported share of the original Perkstar credit once |
| Reward redemption | Records redemption in Perkstar; staff complete the matching till adjustment in Square |

## What you need

* A Perkstar **Scale** plan or another plan that includes POS Connect.
* Owner access or a team role with **Edit operations** in Perkstar.
* Permission to approve apps for the intended Square production account.
* At least one active, earn-ready Stamp, Points or Cashback programme.
* Customers enrolled in Perkstar before the payment you want to reward.
* For one-scan identification: an individual default programme with a QR code
  and required First name and Email fields.

<CardGroup cols={3}>
  <Card title="Set up Square" icon="sliders" href="/integrations/square/setup">
    Connect safely, choose the default programme and review every location.
  </Card>

  <Card title="Earn and redeem" icon="cash-register" href="/integrations/square/earning-redemption">
    Give staff the exact customer, payment and reward workflow.
  </Card>

  <Card title="Refunds and help" icon="life-ring" href="/integrations/square/refunds-troubleshooting">
    Reconcile corrections, diagnose missing credit and disconnect safely.
  </Card>
</CardGroup>

## Data use

For payment earning, Perkstar reads the Square merchant and location profile,
completed payments and refunds, and only the customer attached to a payment.
Email or phone is used transiently to find an existing Perkstar member. If no
member matches, the contact is not retained, enrolled or used for marketing.

Optional Wallet-card identification does nothing in Square without current
customer consent. For a consenting customer, it performs complete exact
searches by the stable scan reference, email and, when available, phone. If the
searches resolve to one Square Customer, Perkstar links that profile. If none
resolves, Perkstar may create a Square Customer from first name, optional
surname, email and optional phone. Perkstar writes the stable Wallet scan value
only when `reference_id` is empty, never overwrites a value owned by the
merchant or another system, and releases only a value for which it has durable
ownership evidence.

After a successful match, Perkstar stores an opaque Square customer link scoped
to that merchant and connection. It also stores encrypted OAuth credentials,
card and location routing, and the operational and loyalty records required to
deduplicate earning and reconcile refunds. See [Set up Square](/integrations/square/setup)
for the permissions and test procedure.

<Note>
  Need help with a Square connection? Email
  [support@perkstar.co.uk](mailto:support@perkstar.co.uk) with the Perkstar
  business name, approximate payment or refund time, and Square location name.
  Never send an access token, raw webhook payload, payment-card data or customer
  contact details.
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.