How garment codes work

A code turns one piece of clothing into a storefront that keeps selling for years. Here is the whole lifecycle, drawn out, including every point where a scan or a sale is tracked.

Mint the code

Garment or store target

Print and stitch

SVG into the seam

Activate at checkout

Clerk scan, code goes live

The garment is worn

Years of exposure

Someone scans

Owner or admirer

A sale, then credit

Ledger entry for the holder

PRIMA writes data at three moments:ActivationEvery scanEvery order

The buyer walks out with their own coded garment, so the last stage becomes the first stage again.

Six stage lifecycle: mint the code, print and stitch it, activate it at checkout, the garment is worn, someone scans it, a sale writes credit, and the buyer's new garment restarts the loop.
  1. Mint the codes

    Pick a target: one garment, or the whole storefront. Mint anywhere from one to ten codes in a batch. A garment code deep links to that piece, a store code opens the catalogue, and either can carry a readable short link in front of it.

    Open the code generator

    One shared code, or one code per garment

    Shared code

    The same code on every unit of a style, or on the storefront itself. Anyone who scans can buy.

    Unique codes

    A different code in every garment. The wearer claims theirs and earns the share you set on each sale it drives.

    A shared style code lets anybody buy the piece but pays nobody. Unique per garment codes bind to the wearer, who earns a share the store decides.
  2. Print and stitch the tag

    Download one SVG per code, or a print sheet with the whole batch laid out for cutting. Set the print colours and quiet zone first so the code survives being woven or heat pressed into the seam below the label.

    Set the QR design
  3. Activate at the point of sale

    A fresh code is dormant. It opens the garment page but credits nobody and cannot be claimed, so a code scanned in the fitting room is worthless. A clerk scans it at checkout to activate it, which means only a buyer ever ends up holding one.

    Open the point of sale

    Code states

    Dormant

    Opens the garment, credits nobody, cannot be claimed

    Active

    Live and waiting for its first scan

    Claimed

    Bound to one person, earning on every scan

    Disputed claim: the real wearer submits a photo of the garment and the code, you review it, and an upheld claim moves the code from one holder to the other. Credit written before the decision stays with the sale it belonged to.

    A code moves from dormant to active when a clerk scans it at checkout, then to claimed when the buyer signs in. An upheld dispute reassigns a claimed code to the real wearer.
  4. The buyer claims it

    The first person to scan an active code is asked whether they own the garment or saw somebody else wearing it. An owner creates an account and the code becomes theirs. A passer by is sent to the garment and their visit is credited to whoever holds the code.

    See a code register

    What happens on a scan

    A phone opens the code

    Do you own this garment, or did you see someone wearing it?

    I own this garment

    Create an account and the code becomes yours. Every future scan of that piece earns you credit.

    Recorded: claim time, holder, and the code moves to claimed.

    I saw someone wearing it

    Straight to the garment page, ready to buy, with other pieces from the same store alongside.

    Recorded: an open on the code, attributed to the current holder for the session.

    The piece is no longer available

    The store's closest alternatives are shown instead of a dead end, and the referral still stands.

    Recorded: an open plus a substitution, so the code keeps earning.

    A dormant code shows the garment but attributes nothing, so a scan in the fitting room can never take credit.

    A scan asks whether you own the garment or saw someone wearing it. Owners create an account and take the code. Admirers land on the garment with the visit credited to the holder. If the piece is gone, similar pieces from the same store are shown.
  5. Everything is recorded

    Each code carries its own record: how many times it was opened, which orders it produced, who holds it, and what it has earned. Nothing depends on a cookie surviving, because attribution is written against the code itself.

    Open a code record

    Where the tracking happens

    1. Activation scan

      Code, clerk, store, timestamp. The code flips from dormant to active.

      Shows up in: Point of sale, and the code's own register entry

    2. Code opened

      Open count, time, device entry point, target (garment or store), and the holder it is attributed to.

      Shows up in: Code detail page and the QR list

    3. Order placed

      Order value, items, and the code that carried the visit, so the sale is tied back to one person.

      Shows up in: Code detail transactions, store earnings

    4. Commission written

      Rule applied, amount, and status. Percentage of the sale or a fixed credit.

      Shows up in: Referral ledger and the holder's credit

    5. Approved

      Approval after the return window, which moves credit from pending to payable.

      Shows up in: Referral ledger

    6. Paid out

      Payout batch, method, and date.

      Shows up in: Payouts

    Six recorded events in order: activation scan, code opened, order placed, commission written, approved, paid out. Each lists what is captured and where it appears in the studio.
  6. Every sale writes credit

    When a scan turns into an order, commission is calculated from the garment override or the store default, as a percentage of the sale or a fixed amount. Credit lands in the holder's ledger and moves to payouts once approved.

    Open the referral ledger

    How the credit is calculated

    Sale amount

    Order total attributed to the code

    Rule resolver

    Garment override first, store default second

    Percentage or fixed

    Set per garment or across the store

    Credit to the holder

    Pending, then approved, then paid

    Garment level

    Give one piece a richer share, or none at all. The override always beats the store setting.

    Store level

    One default for the whole catalogue, applied to any garment without its own rule.

    A sale runs through the rule resolver: a garment override wins, otherwise the store default applies. The rule is either a percentage of the sale or a fixed amount, and the result lands in the holder's credit as pending, then approved, then paid.
  7. Disputes go through claims

    If a code was already claimed by somebody else, the real wearer can dispute it with a photo of the garment and the code. You review the evidence and either uphold or reject the claim, and ownership follows your decision.

    Review claims

Wants and bags

A scan can end in either of two places. Double-tapping a garment adds it to the shopper's want list, which keeps everything across every PRIMA store until they clear it. The bag is only for what they have decided to buy, and one checkout can settle garments from several stores at once when the delivery address is the same. Attribution follows the garment from the want through to the order, so the referrer is still credited.

See a want list

Want to see it already running?

The example storefront is a full account with inventory, live codes, scans and earnings, so you can see what yours looks like once it is up and running.

Open the example storefront