Scrip
Request access
Rewards API

A rewards API with a ledger at the core.

Send an event when a customer does something worth rewarding. Scrip runs your rules, records what changed, and keeps every balance right through refunds, expiration, and redemption.

Definition

What a rewards API is.

A rewards API is an API for running a points or rewards program. Your product reports what customers do, a purchase, a referral, a milestone, and the API decides what each action earns, tracks every balance, and handles spending the value later. The logic and the accounting live behind the API instead of in your codebase.

Teams pick one up in two situations: they're adding rewards and don't want to build earning, balances, and redemption from scratch, or their homegrown system is cracking: balances drift after refunds, promos stack in ways nobody modeled, and month-end totals never quite add up.

What's included

What Scrip's rewards API includes.

Six stages, each one a documented API surface you can call directly.

  • 01

    Events in

    Every signal is an event: a purchase, a referral, a deposit. POST it with the customer, a timestamp, and your payload. Each carries an idempotency key, so sending one twice can't double-award.POST /v1/events · idempotency_key: "order-456-completed"
  • 02

    Earn rules

    A rule pairs a condition with a payout: dining purchases earn 3x points. The rewards engine runs your rules on every event, and a promo or multiplier change ships without a deploy.event.type == "purchase" → CREDIT 10 PTS
  • 03

    Double-entry ledger

    Every movement is recorded double-entry: each credit has a matching debit, so balances always add up. Entries are never edited in place, so you get a full audit trail for free.
  • 04

    Balances & redemption

    Query any customer's balance and spend it down, by amount or from a rewards catalog. Redemptions confirm in two steps and reverse, even partially, when an order changes.
  • 05

    Expiration & breakage

    Each batch of points knows when it was earned and when it expires, so how much expired unused last quarter is an exact number, not an estimate.
  • 06

    Webhooks out

    When a balance changes or a redemption completes, Scrip calls your endpoint so your statement-credit or payout provider can act. Scrip never moves money.event.completed · reward.redeemed
From the docs

One rule, one event, a correct balance.

Two calls: define a rule, then send events as they happen. The API answers 202 Accepted and finishes in the background; your webhook hears when it's done. Send the same idempotency key twice and you get the original event back, never a second credit.

The quickstart walks the whole flow, from creating a program to verifying the first balance.

1 · Create a rule
curl -X POST https://api.scrip.dev/v1/rules \
  -H "Authorization: Bearer $SCRIP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "program_id": "YOUR_PROGRAM_ID",
    "name": "10 Points per Purchase",
    "condition": "event.type == \"purchase\"",
    "actions": [
      { "type": "CREDIT", "asset_id": "YOUR_ASSET_ID", "amount": "10" }
    ]
  }'
2 · Send an event
curl -X POST https://api.scrip.dev/v1/events \
  -H "Authorization: Bearer $SCRIP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "program_id": "YOUR_PROGRAM_ID",
    "external_id": "user_123",
    "idempotency_key": "first-purchase-001",
    "event_timestamp": "2026-07-05T12:00:00Z",
    "event_data": { "type": "purchase", "amount": 49.99 }
  }'
Choosing

Rewards API vs. loyalty platform.

Both get you a program. The difference is who builds what your customers see.

A loyalty platform

Ships the whole program: enrollment pages, campaign tools, email, widgets, and a console for marketers. Faster if standard mechanics fit and you're comfortable with the platform's screens in front of your customers. If that's you, a platform is the honest answer.

A rewards API

Gives you the primitives: events, rules, a ledger, balances, redemption. You build what customers see; the API keeps the program correct underneath. The fit is rewards that live inside your product, with accounting that has to satisfy finance and auditors.

Scrip is the second kind. Operators still get a dashboard for rules, participants, and reporting, but your customers only ever see your product.

> QUESTIONS

Rewards APIs, answered.

Mostly naming. Both describe an API for issuing, tracking, and redeeming program value. Loyalty API is the more common term for consumer retail programs; rewards API covers the same surface plus incentive programs that aren't consumer loyalty, like seller bonuses, usage credits, and referral payouts. Scrip's API runs both.
Next

See the rewards API against your program.

Tell us how your program earns and redeems today and we'll map it to Scrip, or start with the quickstart.

Where it runs

The same ledger runs cards & banking, retail & ecommerce, marketplaces & platforms, subscriptions & SaaS, and AI products & agent platforms programs. More on why we build it this way is on the about page.