# Tiers, request limits and redistribution terms

What the pricing page says, what each tier includes, and what a developer is agreeing to when the API tier ships.
Prices here are planned. Nothing on the site charges money today, and no page takes a payment.

Page: `pricing.html`, served at https://safastack.com/pricing. The tier wording there matches the home page section,
and the copy check reads the file.

## The three tiers

| Tier | Price | Ships when |
|---|---|---|
| Free | US$0 | Live now |
| Alerts | US$8/month, or US$59/year (about US$4.92/month billed yearly) | Once the launch gates below are met |
| Developer API | US$29/month | Once the funds' written permission covers redistribution |

### Free

Today's list, for anyone. Every ticker, name and weight SPUS publishes, with the issuer's own page as the source link
on the row. The as-of date on every row. The last 7 days of entries and exits. Dated JSON (`latest.json`) to inspect
and check against the source, not to redistribute. HLAL stays a link to Wahed's holdings page, plus the fund's
quarter-end holdings from its SEC filings. No card, and it never expires.

### Alerts

Everything in Free, plus the full change log since our first snapshot with the date on both sides of each change, one
email on the days a ticker enters or leaves SPUS, HLAL's quarter-end changes from the fund's SEC filings, weight
shifts of 0.5 percentage points or more between two days with both weights and both dates, and a CSV export of the
history for personal use. Cancel any time. API keys and redistribution rights are not part of this tier.

Launch gates, all three of them:

1. At least 14 consecutive daily snapshots on the record, so the change log isn't two days long.
2. An alert email that sends from our own address, with the list double opt-in and an unsubscribe link in every send.
3. The three price points approved, then the Stripe products reserved and the checkout link published on `pricing.html`.

Status on 2026-09-13: the first gate is not met. One dated snapshot, `data/holdings/2026-09-12.json`, is committed,
and the daily workflow is waiting on the owner to run it from GitHub Actions. So the Alerts button on the pricing page
is a waitlist link, not a checkout.

### Developer API

Versioned JSON over HTTPS with CORS enabled, a one-page schema doc and a status endpoint. Holdings as of a date,
holdings for one fund, the change log between two dates, the fund list. Stable field names, and the source URL and
as-of date in every record, matching what the site publishes. One tier only at launch.

This tier cannot ship before the issuers' written permission covers redistribution, which is a decision the issuers
make and not us. If it doesn't arrive, the tier doesn't ship and we say so. Nothing here is a license to redistribute
the data.

## Request limits

| Limit | Value |
|---|---|
| Requests included | 10,000 per calendar month |
| Rate | 5 requests per second |
| Above either limit | HTTP 429 with a `Retry-After` header |
| A daily full snapshot | about 30 requests a month |
| Keys | one per subscription, not to be shared or resold |

The monthly allowance is deliberately generous: a job that pulls the newest snapshot once a day uses a small fraction
of it, and a developer shouldn't have to count requests. There is no bulk download endpoint and no unlimited history
export at any price.

Planned endpoints: holdings as of a date, holdings for one fund, the change log between two dates, the fund list, and
a status endpoint. Versioning is by path (`/v1/...`), fields are additive, and a breaking change means a new version
rather than a quiet edit to the old one.

## Redistribution terms for developers

- A subscription is a license to use the data inside your own product. It is not a license to republish, resell,
  mirror, or redistribute the data, in whole or in part, to anyone else.
- No tier at any price includes redistribution rights. The holdings are the issuers' content, so the right to
  redistribute them is theirs to give, not ours. We're asking, and we publish only what the answer covers.
- Keep the source URL and as-of date in every record you display, and for SPUS rows attribute SP Funds with a deep
  link to the fund's own holdings page. Our files carry the attribution wording to copy.
- HLAL rows are not available at any price. Wahed's terms don't permit republication without written consent, so we
  link out to their page and take HLAL history from the fund's SEC filings (Form N-PORT) instead.
- The API returns what a named fund published as held on a given date. It never returns a compliance answer, a
  screening verdict, a score, or a recommendation. No "certified", "approved" or "halal" field exists in the schema,
  and none will be added.
- Bulk scraping of the site, of the published JSON, or of the API to rebuild the dataset elsewhere is not permitted,
  whether or not a subscription is active.
- SafaStack is not affiliated with, sponsored by or endorsed by SP Funds, ShariaPortfolio, Wahed Invest LLC or any
  index provider.

Data, not investment advice.

## Checkout links and how the tiers go live

The three Stripe products were created on 2026-09-13 (Alerts monthly, Alerts annual, Developer API monthly). The
checkout URLs are held out of the published pages until the gates above are met, so they live in
`internal/pricing-checkout-links.md`, which is not deployed, rather than in any page or in this file.

To turn a gate into a live button:

1. Confirm the gate. For Alerts: 14 consecutive committed snapshots in `data/holdings/` and an alert sender that
   works. For the API: the issuers' written permission logged in the permissions document.
2. On `pricing.html`, set that tier's button `href` to the Stripe URL and change the button label to the purchase
   wording, then delete the matching "No checkout here yet" note.
3. Run `node tools/copy/check.mjs` and read the diff aloud before deploying. The prices and the footer are protected
   strings, so an accidental rewrite fails the check.

### Gate check, 2026-09-13

Task #51 asked for whichever gate had closed. Neither had, so no checkout URL was published and `pricing.html` is
unchanged: both buttons still point at the waitlist, and both notes stay. Checked against the repo, the permissions
log and the live page at https://safastack-site.vercel.app/pricing.

- Alerts: one dated snapshot on the record, `data/holdings/2026-09-12.json` (219 SPUS rows, `latest.json` pointing at
  it), so the 14-day gate is still open. The sender gate is open too: no alert has gone out from our own address and
  the newsletter still carries its default name.
- Developer API: no permission on file. The SP Funds request is still queued for owner approval and Wahed's reply was
  an automated routing message, so the button stays a waitlist link. The tier's refusal fallback on the page is
  already what we do.

Counting rule for the first gate: the ingest runs on weekdays, so 14 consecutive means 14 dated snapshots in a row and
none missing for a day the schedule was due. Weekends are not gaps. Each day counts once even when the workflow fires
twice.

Before any button points at a Stripe URL, confirm that URL works in live mode. The products created on 2026-09-13
returned test-mode links (`buy.stripe.com/test_...`), which cannot take a payment. Raised with the owner.

Nothing else on the site should point at a checkout URL until then, and no page should ever explain a tier that isn't
shipping as though it were for sale.
