Hackathon Provenance & Commit Boundary (What Was Built During the Hackathon)
CreditRoll Live was built during the PayPal AI Hackathon submission period (November 2–12, 2026) on top of PayPal's official hackathon starter template (paypaldev/ag-paypal-demo):
- Pre-Hackathon Official Starter Template (
c2d80f0..5de114e, Sep 27 – Oct 12, 2026): Unmodified baseline commits from the official PayPal / AG Grid starter repository (https://github.com/paypaldev/ag-paypal-demo, authored by Eddie Jaoude and James Swinton-Bland), which provided the initial Next.js + AG Studio boilerplate. - Built During the PayPal AI Hackathon (
ddad6e0..6dd42c7, Nov 2 – Nov 12, 2026): 100% of CreditRoll Live was designed and implemented during the hackathon period, including:- Deterministic End-Credits & Completion-Bond Reconciler + OpenAI Responses API Contract Review (
lib/credit-roll-reconciler.ts,lib/credit-roll-ai.ts): Cut v1 → Cut v2UNPAID_GHOSTdetection (Moth,Nyx Frame), stage-name-to-legal-contract identity resolution, live AI contract & cue reconciliation, integer-cent guardrail verification (discardedAiAmountOverrides), andNEEDS_REVIEWhold on ambiguous aliases (Alex Rivera). - Three-Leg Live PayPal Sandbox Write & Read-Back Settlement Loop (
lib/paypal.ts,lib/credit-roll-settlement.ts,app/api/credit-roll/*):Orders v2 CAPTURE+ post-approval capture endpoint,Invoicing v2 + QR Code,Batch Payouts v1withPayPal-Request-Ididempotency, restart duplicate-batch lookup recovery, a separate$0.01single-recipient test payout, and per-itemtransaction_statusread-back. - 35mm Screening Room Dossier & Two Custom AG Studio 3.0 Widgets (
app/page.tsx,app/dossier.ts,app/dashboard/studio/credit-roll-widgets.tsx): Full "Midnight Cutting Table & Completion-Bond Ledger" UI redesign,CreditRollStageWidget(24fps sprocket-lit end-credits stage withwidgetApi.toggleCrossFilterinto AG Grid), andGhostPatchbayWidget(ivory tear-off voucher desk with live PayPal Sandbox & AI provider receipts). - 38 Automated Acceptance & Sandbox Boundary Tests (
tests/*.test.ts) and 45-Second Launch Film (https://youtu.be/cE3SuZF7sic).
- Deterministic End-Credits & Completion-Bond Reconciler + OpenAI Responses API Contract Review (
- Live Render HTTPS Deployment: https://paypal-credit-roll-live.onrender.com (Direct AG Studio Workspace)
- Always-Warm Cloud VM Mirror: http://144.202.121.72:3001 (Direct AG Studio Workspace)
- GitHub Repository: https://github.com/GGGODLIN/paypal-credit-roll-live
CreditRoll Live
Inspiration
A director can cut a scene without cancelling the crew member's contract. CreditRoll Live keeps those two facts visible together: Moth and Nyx Frame disappear from the director's cut, but their approved fees remain owed. An ambiguous stage name such as Alex Rivera stays on hold instead of becoming a payment recipient.
What it does
The AG Studio dashboard connects an interactive end-credits strip, a contract ledger and PayPal Sandbox receipts. Switch between the rough cut and director's cut, then click a contributor to cross-filter the grid.
The Ghost Patchbay's “AI · Review credits & contracts” button sends the fictional cue sheet and contract roster to the OpenAI Responses API. It asks the model to cite cue and contract IDs when explaining removed credits, stage names and unresolved aliases. The default model is gpt-4o-mini. Deployments can select another supported model with OPENAI_MODELS and an OpenAI-compatible endpoint with OPENAI_BASE_URL. The UI reports the actual returned model, response ID, request ID and token usage; missing provider fields are labelled as unavailable.
The AI review is advisory. Locked integer-cent fees, verified recipients and human approval control settlement. With no API key, the review explicitly displays “fallback: deterministic-local” and makes no model call. A configured provider error stays an error rather than silently becoming an AI result.
PayPal integration
All payment operations use PayPal Sandbox:
- Orders v2: create a supporter order, hand off to PayPal buyer approval, capture the approved order and read it back. Return and cancel destinations point to the configured application origin.
- Invoicing v2: create and send an obligation invoice, generate its QR code and read the invoice back.
- Payouts v1: submit a producer-approved batch and read individual payout statuses. Only an item's SUCCESS marks its contract paid. PENDING and UNCLAIMED remain visible.
- A separate one-cent payout tests one verified recipient without settling the real contract. Insufficient funds produce a readable diagnostic.
The API calls are POST /v2/checkout/orders, POST /v2/checkout/orders/{id}/capture, GET /v2/checkout/orders/{id}, POST /v2/invoicing/invoices, POST /v2/invoicing/invoices/{id}/send, POST /v2/invoicing/invoices/{id}/generate-qr-code, GET /v2/invoicing/invoices/{id}, POST /v1/payments/payouts and GET /v1/payments/payouts/{batch_id}. The starter also reads catalog products, billing plans, invoices, transactions and balances.
Try it in three minutes
- Open the dashboard (or the always-warm mirror). The application needs no login or app test credentials. Allow the Render service to cold-start if idle.
- Toggle the cut version and click Moth to inspect the retained obligation in the grid.
- Press “AI · Review credits & contracts” in Ghost Patchbay and inspect the review and provider receipt. A deployment without a key will explicitly show the local fallback.
- Inspect the PayPal controls and historical receipts. If testing payouts, tick producer approval and choose “Test one crew payout · $0.01”; sufficient Sandbox balance and fees are still required. The full crew batch is a separate action.
For supporter checkout, use your own PayPal Sandbox personal buyer account on PayPal's approval page. No buyer password is distributed with this project. Return to the same dashboard and use “Capture approved order”. Keep the current tab and server alive because pending order receipts are stored in memory.
Watch the launch film or browse the source and setup instructions.



How we built it
CreditRoll Live extends the official PayPal AG Studio starter with a deterministic reconciler, two custom AG Studio widgets, server-side PayPal operations and an explicit AI contract review. It uses Next.js, React, TypeScript, AG Studio and AG Grid. The reconciler, PayPal client and AI review are available in the repository.
Challenges and limits
A submitted batch is not proof that each crew member was paid. The dashboard therefore preserves PayPal's individual item statuses. Stable payout identifiers bind the proposal's recipients and amounts; when PayPal returns a duplicate batch link after a restart, the client reads that original batch instead of generating a new transfer key.
This remains a Sandbox demonstration without a durable settlement database or app authentication. PayPal's duplicate recovery depends on its retained batch and returned link. A changed proposal is not authorization to pay an already settled contract again. The credit animation has play/pause and cut switching, with no rewind control. Screenshots and the launch film predate the audit remediation controls.
Automated tests use mocked external API boundaries. They cover payloads, read-back, guardrails, duplicate recovery, the separate small test payout and true-provider versus local-fallback routing; they do not by themselves prove a deployed account has a working model key or funded Sandbox balance.
Built With
- css
- javascript
- next.js
- openai
- paypal
- react
- typescript