Skip to content

From receipt to payout.

Everything runs in the PayPal sandbox. No real money moves.

Judge quickstart

  1. Open the demo

    You are signed in as Maya, owner of the Northbeam Labs workspace, with sample claims already loaded.
  2. Create a claim

    Open Claims, click New claim, and upload a sample receipt:

    Or paste a message:

    Example message
    I paid $42.30 for Uber for @rita yesterday
  3. Approve a batch

    Open Batches, then September offsites. Click Approve & Pay and type APPROVE to confirm.
  4. Watch it settle

    Item statuses update as PayPal reports back (SUCCESS, UNCLAIMED, FAILED). Activity shows the full audit trail.

Local setup

Requires Node.js, pnpm and a Postgres database.

Setup commands
pnpm i
cp .env.example .env.local
pnpm db:migrate
pnpm dev

Environment variables

DATABASE_URL
Postgres connection string. Required.
SESSION_SECRET
Signs session cookies. Required. Use a long random string.
ANTHROPIC_API_KEY
Optional. Reads receipts with Claude vision.
OPENAI_API_KEY
Optional. Reads receipts with OpenAI vision. With neither key, on-device Tesseract OCR does real extraction, no key needed.
PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET
Optional sandbox credentials. Without them, a clearly labelled payout simulator runs.
PAYPAL_WEBHOOK_ID
Sandbox webhook ID, used to verify PayPal webhook signatures.
ZAPIER_WEBHOOK_SECRET
Shared secret expected in the x-settleshort-secret header.
DEMO_PAYPAL_RECEIVERS
Comma-separated sandbox personal accounts for the demo teammates.

API overview

All endpoints live under /api/v1, are scoped to the caller’s workspace, and return JSON.

  • POST/api/v1/claims/uploadUpload a receipt image or PDF and extract a claim
  • POST/api/v1/claims/from-textCreate a claim from a natural-language message
  • GET/api/v1/claimsList claims in the workspace
  • PATCH/api/v1/claims/:idEdit claim fields before approval
  • POST/api/v1/claims/:id/rejectReject a claim
  • POST/api/v1/claims/mergeMerge a duplicate into its original
  • POST/api/v1/batchesCreate a payout batch from ready claims
  • POST/api/v1/batches/:id/approveAdmin only. Requires typed APPROVE confirmation
  • POST/api/v1/batches/:id/refresh-statusPull latest item statuses from PayPal
  • GET/api/v1/batches/:id/exportDownload the batch as CSV
  • POST/api/v1/webhooks/paypalPayPal Payouts webhook receiver
  • POST/api/v1/webhooks/zapierInbound messages from Zapier
  • GET/api/v1/healthHealth check

Zapier recipe

Turn Slack messages into draft claims: trigger on a new message in a channel, then add a Webhooks by Zapier POST action.

Zapier webhook request
POST /api/v1/webhooks/zapier
x-settleshort-secret: <ZAPIER_WEBHOOK_SECRET>
content-type: application/json

{
  "workspace_slug": "<your-workspace-slug>",
  "text": "I paid $84 for dinner for @sam @rita",
  "from_email": "maya@northbeam.test"
}

Claims created this way still go through review and the admin approval gate.