Skip to content

Storelayer Documentation

Storelayer is an HTTP API for loyalty state and logic. Your backend sends customer events and carts; Storelayer evaluates your rules and promotions, keeps a wallet per customer, and tracks referrals. Everything lives inside a project, reached at https://api.storelayer.io with a project API key.

You want to…Start with…Important distinction
Make your first API callQuick startUses a project API key from the dashboard
Understand the building blocksIntroductionEvent → rule → wallet; cart → promotion
Award points for purchases or signupsLoyalty program guideRules react to events asynchronously
Write rule or promotion conditionsConditionsShared condition-group format
Discount a cart or redeem a couponCreating promotionsCart money is integer minor units (cents)
Custom discount logicDiscount scriptsScript returns per-item discounts
Run a referral programReferral programsCodes, attribution, completion
Read or adjust balancesWalletsBalances are keyed by asset type
Debug why nothing happenedDebugging and WorkflowsEach event produces an inspectable run
Let a coding agent build itBuild with an agentSkill, Markdown docs, OpenAPI, MCP

Read /llms.txt, then fetch only the pages your task needs. Every page has a Markdown version at <path>.md (this page: /index.md). The Storelayer skill points agents at these docs.