-
-
Reprice Desk: raise PayPal subscription prices for exactly the members you choose.
-
The agent finds that three readings of "founders" disagree and asks which one you mean.
-
Strategy A and B compared side by side with eight code-computed metrics.
-
The Approval card: you type the prices, nothing moves until you approve.
-
Execution view: every member's price read back, run log and webhook rows.
Inspiration
On PayPal, changing a plan's price updates it "for all existing subscribers", and "existing subscribers are notified by email about the price change" (PayPal docs: https://developer.paypal.com/subscriptions/change-price.md). The only per-member protection is a subscription override: "once overridden, changes to plan resource will not impact subscription" (Subscriptions API, Update subscription). Doing that safely, member by member and in the right order, is left to the merchant.
Real operators do it by hand or with scripts. One Stack Overflow question (2023-03-21) describes "around 10000 active subscribed or recurring users" and says "updating 10000 subscriptions via Dashboard is not a great idea". We wanted a desk where an operator says "keep founders at $9, raise regular monthly to $12" and the dangerous parts are handled by code.
What it does
Reprice Desk is an AG Studio dashboard with a Claude agent, for the owner of a small membership business that bills members through PayPal Subscriptions.
- The agent reads the subscribers, finds where three readings of "founders" disagree (tag, signup month, launch campaign), and asks which one you mean.
- Code, not the model, computes a side-by-side comparison of two strategies. Strategy A: pin each kept member's price with a subscription override, read it back, then raise the plan price. Strategy B: leave the old plan alone, create a new plan for new signups, and raise only the chosen members one by one.
- You type the new prices into two empty boxes in the Approval card. The model never sets a price, and nothing is compared before you do.
- After you approve, the server runs a fixed order and reads every member's price back. The Execution view shows kept members unchanged, new plan IDs, scheduled raises, the run log and webhook rows.
- Scope is plans and prices only. There is no cancel, pause, suspend or refund feature.
For the 12-member demo bundle the app computes 12 versus 8 PayPal writes, 8 versus 6 overrides left behind, and 1 member pushed out of a 7-30 day notice window by strategy A. It helps you keep a notice window you choose; it is not legal advice.
How we built it
- PayPal: subscriptions, plans, plan price changes and subscription PATCH overrides go through the APIMatic-generated
paypalTypeScript SDK (client.subscriptions). Two calls the SDK lacks (catalog product create, webhook signature verification) stay on REST. The hosted demo runs PayPal on a built-in stand-in with the same call shapes and rules; the real PayPal sandbox path was run separately. - AI: Claude Sonnet (
claude-sonnet-5-5) runs the Reprice Agent live on the hosted demo through a small server-side proxy that converts AG Studio's adapter format to the Anthropic Messages API. Every number the agent states comes from a tool result. The agent hands dashboard requests such as "Show kept members by signup month." to Studio's built-in data, page and widget agents. Live runs have per-IP-hour and per-day caps; when the API fails or a cap is hit, the action still finishes with a labelled recorded run or a rule-based stand-in. - AG Studio (AG Grid): Agent Framework with a Claude adapter we wrote, five custom widgets (Strategy compare, Approval card, Price ladder, Notice window strip, Next steps), a navy/mint/amber theme with a light variant, grids with badge cell renderers, tool displays in chat and two saved layouts.
- APIMatic Context Plugin for PayPal: the live PayPal adapter was written with its TypeScript skills. It added a claim before every PayPal write (the same write cannot reach PayPal twice), "unknown" outcomes when a response is lost, one error mapping, and a contract sheet.
- Money rules in code: fixed order, ten-day rule, notice window, locks per bundle, one run per plan. 123
node --testtests cover them. - Stack: React 19, Vite, Express, zod, Node 20+.
Challenges we ran into
- PayPal ignores a price change when the next charge is within 10 days, and the rule differs between plan changes and subscription PATCH.
- An override cannot be removed, so each sandbox bundle can be used once.
- The sandbox rejected
page_size=100forlistSubscriptions; the adapter now asks for 20. - Our first strategy A run in the sandbox stopped at its own verify step: PayPal accepted an override PATCH for a member charged in 6 days but did not apply it (
plan_overridden=false; a member 12 days out was applied). The plan price was not changed, as designed. Strategy A now waits until no member it must pin is within 10 days of a charge.
Accomplishments that we're proud of
- The whole app ran both strategies on fresh PayPal sandbox bundles and read every price back (VERIFY.md V19 and V20, 2026-11-12). Strategy B created two new plans and raised three members to $12.00 without writing to the six kept members. Strategy A pinned eight members, read them back, then moved the plan prices to $12.00 / $120.00; kept members read back at their old price.
- A safety design where the model can explain and propose but never set a price or move money.
- A Claude Sonnet run in which the agent delegated to Studio's data, page and widget agents and added a working chart.
What we learned
- A price-change tool for subscriptions has to treat "when is the next charge" as seriously as "what is the new price".
- Read-back from the payment provider is the only proof that a write took effect; a lost response must be "unknown", not "failed".
- AG Studio's agent framework lets an agent drive a real dashboard, as long as the numbers come from code.
What's next for Reprice Desk
- Dashboard change watch (not built; the switch is shown disabled in the app): warn when a plan price was changed in the PayPal dashboard outside the desk.
- Detect an increase cap from PayPal's refusal message instead of a setting (the setting-based clamp is in the code).
- More than one currency (not built; the app is USD only).
- "Reprice with cohorts" as a tool other agents could call, for example through the PayPal Agent Toolkit (not built).
Built With
- ag-grid
- ag-studio
- ai-agent
- anthropic
- apimatic
- claude
- express.js
- fintech
- node.js
- paypal
- pricing
- react
- saas
- sandbox
- subscriptions
- typescript
- vite
- zod