API

Tell us when someone did the thing. That’s the whole integration — one call, from the code that already knows it happened.

1. Get a key

Send it as a bearer token from your server. Keys starting sk_test_ only touch private tests and are never invoiced; sk_live_spends real budget. A test key is refused on a live Rewarded Action and vice versa, so a test harness left running can’t bill you.

You’ll get keys with your account. Sign in.

2. Install

npm install @mintfall/node

3. Capture

Wherever your backend already knows the event happened — the signup handler, the upgrade webhook, the feature flag that just flipped.

import { Mintfall } from "@mintfall/node";

export const mintfall = new Mintfall({
  key: process.env.MINTFALL_KEY!,       // sk_test_… while you build
  action: "ra_1a2b3c",
});

// then, wherever it already happens. "connect_repo" is the requirement's slug,
// not its category — pass the plain email and we hash it before it leaves you.
await mintfall.capture("connect_repo", { email: user.email });

That’s it. We match the call to a participant, tick the requirement, and pay them the moment the set is complete. Retry as much as you like: the same event reported twice is a no-op, enforced by a uniqueness constraint rather than by you remembering an idempotency key.

Everything else

Open one when you need it. None of it is required to get the three steps above working.