Inspiration

A solo seller in Seoul who ships abroad gets most of their questions at 2 a.m. Buyers in California and Tokyo want a landed price in their own currency, and a late parcel needs an answer now, not at breakfast. A chatbot can reply, but it can't take the payment, give the refund, or keep the books. And an agent that can move money is only useful if a persuasive buyer can't talk it into giving the shop away.

What it does

Night Desk runs a small shop through the seller's own PayPal account. The demo shop, Munbang Stationery, is a fictional demo shop with a made-up catalog; everything runs on the PayPal sandbox.

For buyers, it:

  • answers in their language and quotes in their currency (USD or JPY), with shipping and estimated duties
  • creates the PayPal order and captures the payment
  • attaches tracking to the PayPal transaction and tells them when the parcel moves
  • notices a parcel that has stalled, refunds part of the order by itself and apologises
  • refuses a refund that the delivery record contradicts, and shows the record

For the owner, it:

  • writes down why it made every money movement, next to what the rule gate decided
  • produces a morning report: sales in both currencies, PayPal fees, net after conversion, refunds, what it blocked, what needs them
  • reconciles that report against PayPal's own Transaction Search records, payment by payment
  • holds what it shouldn't decide alone: one click approves and sends the refund through PayPal, and the shopkeeper tells the buyer
  • suggests one product set from what buyers asked about, which the owner can adopt into the catalog

The owner does two things: set the house rules and pack the parcels. Any seller can use it: swapping the shop means editing two files, the shop profile and the catalog.

How we built it

  • Claude (Anthropic API, tool runner) is the shopkeeper: Haiku 5.5 with prompt caching, about $0.0005 a turn.
  • PayPal REST APIs (sandbox): Orders v2 in USD and JPY, Payments capture and partial refunds, webhooks with signature verification, and the Reporting API's Transaction Search.
  • PayPal Agent Toolkit: order lookup and shipment tracking, each tool limited to the buyer's own orders.
  • A rule gate in code, in front of every call that moves money: discount limit, per-order and daily refund limits, and a check of each refund claim against the carrier record. The model can ask; only the gate can allow.
  • Next.js 15 on Render, SQLite for the shop's state. The carrier is simulated and labelled so on the page; duties are an estimate.

Challenges

  • Keeping the money rules out of the prompt. A buyer can argue with a prompt. So the model only ever requests a move, and code decides. We attacked it with ten scripted attempts: "ignore your rules", a fake owner, a forged system event, splitting a refund to stay under the limit, someone else's payment ID, stacked discounts. None moved money it shouldn't have.
  • Two currencies. The Toolkit's order tool takes USD only, so orders and refunds go through REST and the Toolkit handles tracking.
  • Reconciling honestly. PayPal's transaction records lag by hours, so the report only claims a match up to the time PayPal's data reaches, and says so when it doesn't reach that day yet.

Accomplishments

  • A real end-to-end loop on the sandbox: quote, order, capture, tracking, automatic partial refund, owner-approved refund, and a ledger that matches PayPal's records.
  • A shopkeeper that answers a Japanese buyer in Japanese, in yen, and still stops at the owner's 15%.

What we learned

An agent that handles money needs a place where it isn't trusted. Once the limits lived in code, the model could be as helpful as it liked.

What's next

Real carrier tracking, PayPal Disputes, more currencies, and a one-step setup for a seller's own catalog.

AI tools used

  • In the product: Claude Haiku 5.5 through the Anthropic API is the shopkeeper. It chats, picks tools, writes the reasons and proposes the product set.
  • To build it: Claude Code helped write the code, tests and documentation, under the author's direction.
  • In the demo video: the English narration is synthesized with Kokoro, a local text-to-speech model; the video is cut together with HyperFrames.

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for Night Desk

Built With

  • anthropic-api
  • claude
  • next.js
  • paypal-agent-toolkit
  • paypal-orders-api
  • paypal-payments-api
  • paypal-transaction-search
  • paypal-webhooks
  • react
  • sqlite
  • typescript
Share this project:

Updates

Submission history