Inspiration

A poster in an ad campaign is rarely one person's work. Ours has an illustrator, an animator and a voice artist. When a brand asks "can we use it in some ads?", what usually follows is an email thread, a guessed price, an invoice to the lead creator, and weeks later a split done by hand. Nobody writes down what was actually bought, and the person with the smallest share (often the voice artist) is rarely asked whether they agree.

We wanted a license that every contributor has actually consented to, priced from terms they set themselves, and paid in a way that can be verified rather than trusted. PayPal felt like the right rail: a payment is a natural moment to make consent binding. No capture, no license.

What it does

A brand describes its use in one sentence. UsagePass:

  1. Reads it with Gemini into structured fields (platforms, paid media, run length, countries, edits, print, exclusivity, excluded uses). Every field has to quote the brand's own words, which are highlighted on the quote.
  2. Prices it only from the creators' rate card. The model never names a number; each line cites the clause it comes from.
  3. Checks every contributor's own terms. When "recut it down to 15 seconds" runs into the voice artist's term "no recutting of my voiceover", the request isn't refused. The engine prices the ways through: keep her voice and drop the recut, or remove her part and re-split the money.
  4. Shows exactly what is licensed before payment, and that every contributor on the license approved this version of the terms.
  5. Pays everyone in one PayPal checkout: an Orders v2 order with one purchase unit per contributor, each with its own payee (or, for some works, Payouts after capture).
  6. Turns the license ACTIVE only on a signature-verified webhook, shows each contributor's own PayPal capture ID, and revokes the license if PayPal reports a full refund.

How we built it

  • PayPal (sandbox).
    • Orders v2 with multiple purchase_units, each with payee.email_address.
    • Capture on return, with PayPal-Request-Id idempotency keys derived from the license id, so a retried checkout or capture can't double-charge.
    • Payouts v1 for the percentage-split mode.
    • Webhooks verified with verify-webhook-signature on the raw body, byte for byte. Duplicate deliveries are applied once.
    • Payments v2 refunds, telling partial from full refunds (PARTIALLY_REFUNDED keeps the license, REFUNDED voids it).
  • Gemini.
    • generateContent with a JSON response schema.
    • gemini-3.5-flash with low thinking, retry and a backup model; a clearly labelled offline keyword reader if the API is down.
    • Server-side guardrails: every piece of evidence must be a verbatim substring of the request, vocabularies are fixed, and a charge with no supporting words becomes a question for the creators instead of a line item.
  • App.
    • A zero-dependency Node.js server, a JSON store, and Server-Sent Events, so the license page changes state live as PayPal's events arrive.
    • A vanilla-JS single-page app with an Explain this screen mode that labels the PayPal call or AI step under each part of the UI.
    • Deployed on Render, with recorded real runs seeded so the demo never starts empty.
  • Design. The license is a two-ink risograph proof. Its pink and blue plates sit out of register until PayPal confirms the capture, then snap into register.

The split math is deliberately boring, because money should be. Each contributor $i$ with agreed share $p_i$ receives

$$ a_i = \operatorname{round}!\left(T \cdot \frac{p_i}{100}\right), $$

with the rounding remainder assigned so that $\sum_i a_i = T$ to the cent. When a contributor is removed (Option B), the remaining shares are renormalised over the set $P$ of contributors still on the license:

$$ p_i' = \frac{p_i}{\sum_{j \in P} p_j}, \qquad \text{e.g. } \frac{70}{70+20} \approx 77.8\%,\quad \frac{20}{70+20} \approx 22.2\%. $$

In our live sandbox run the brand kept the voice and paid $310.00. That became three captures:

Contributor Purchase unit Received after PayPal's fee Capture ID
Maya $217.00 $210.41 7D389201R6690433B
Tomás $62.00 $59.90 5XU885058A1022241
Ines $31.00 $29.80 4F3038719J380184R

Challenges we ran into

  • Keeping the AI away from money. The model is good at understanding "a quarter" as 90 days or "our in-house generator's dataset" as AI training, and it should never set a price. Separating interpretation (Gemini) from pricing (the rate card), and requiring quotable evidence for every field, was the core design decision.
  • Turning "no" into a choice. A contributor's restriction used to be a dead end. Making the engine compute priced alternatives deterministically from the same reading (without asking the model again) means the numbers can't drift between options.
  • Webhooks for real.
    • Signature verification only works on the exact raw body.
    • Events can arrive twice or out of order.
    • PATCHing an unchanged webhook returns an error that has to be treated as success.
    • A user can pay from a stale checkout tab, so the return page checks that the PayPal token matches the order.
  • Model availability. One Gemini version was closed to new keys and another was far too slow for a live quote, so we added a fast default, a retry, a backup model, and an honest offline fallback.
  • Ephemeral hosting. The free host wipes its disk on every deploy, so real sandbox runs are exported (without emails) and seeded on start.
  • A bug the demo video found. Recording the license page revealed that the "plates landing" replay for visitors arriving from PayPal was being cancelled on first paint. We fixed it in the app, not in the edit.

Accomplishments that we're proud of

  • End to end in the PayPal sandbox: one checkout paying three separate accounts directly, verified webhooks driving the license state, refunds revoking it.
  • Gemini correctly maps indirect phrasing to the right terms. "A ballot measure" hits the voice artist's political-ads restriction; "recut it down to 15 seconds" hits her recut restriction.
  • Every amount and ID in the demo video comes from the live run.

What we learned

The interesting part of licensing isn't the price. It's consent among several people, and the payment rail is the natural place to make it binding. Multi-payee orders mean the platform never has to hold anyone's money, and a verified capture is a much better source of truth than a button in our own UI.

What's next for UsagePass

  • Contributors approve new versions of the terms from their own link.
  • Live multi-party payments with PayPal partner onboarding.
  • Exportable license certificates for brands' legal teams.

Sample works, studios and people are fictional. All payments ran in the PayPal sandbox. The license summary is not legal advice.

Built With

Share this project:

Updates

Submission history