MCP account widget
@solvapay/react 2.2.0 ships a rebuilt account widget and puts MCP checkout, top-up, and account
on the same layout as the hosted pages.
- One layout across all three surfaces: primary content leads, seller and your-account trail, and
the identity rail stays visible at every width.
<McpApp>reads the hostdisplayModeand advertisesinlineandfullscreen. Inline is a centered 36rem block. Fullscreen is a 1000px column that falls back to the stacked widget under 1000px of host width. - The account view shows a status pill, a fact band, and a usage meter that warns at 80% of included usage and turns critical at 100%. Each plan family gets its own panel, and every plan row carries its own Activate or Switch action — in place when no payment is needed, through checkout when it is.
- Fullscreen adds plan consequence lines, credit activity and charges tables, and a merchant and buyer footer. Auto-recharge has a dedicated view reached from the account panel.
- The Stripe Payment Element is themed from your
--solvapay-*tokens and uses the tabs layout. The widget owns the billing country instead of the Payment Element, and mandate text sits below the pay button. - A usage-based plan priced at $0 is no longer labelled Free, and one-time and recurring prices render distinctly.
- Outbound links route through the host’s
ui/open-linkwhen the host declaresopenLinks, so a link opens in the host rather than navigating the widget iframe. - The paywall no longer double-counts under concurrency. Concurrent
checkLimitscalls are coalesced, andtrackUsagesends an idempotency key derived from the request id, so a retry records one usage event.
MCP on text-only hosts
Paywall gates and intent tools no longer assume the host can render an iframe.- The default
modeis nowauto. A paywall gate names the included usage and gives a pasteable https checkout URL, and narration emits plan refs, so a customer can recover without a UI panel. - Every response is complete on its own text. Data is included in
content[].textby default, the low-balance nudge and the manage URL are inline, and recovery steps name the tool to call. - Account narration branches on the same states the widget renders and reads total usage, remaining usage, and period end, so what a text host says matches what a UI host shows.
A smaller MCP tool surface
Near-duplicate transport tools were merged, from eight down to five.create_payment_intenttakes apurpose,create_hosted_sessiontakes akind, andset_renewaltakesenabled, replacing the separate per-case tools.- UI-only transport tools are marked private so ChatGPT does not list them for the model. They were never intended for the model to call directly.
- Checkout links are presented as named links instead of raw URLs.
Hosted checkout and account
The hosted pages were rebuilt on one layout and one token set.- Subtotal, VAT, and total moved into the summary rail, so the form column ends at the CTA. The listed price stays visible once tax is known.
- The account page is one column with four tabs. Purchases merged into Billing, which is
now the single charge ledger — settled outcomes only, with status in the charge caption. Old
?tab=purchaseslinks redirect there. - Tax details, card on file, and ledger export are populated on the hosted account instead of rendering empty.
- Optional address fields are no longer collected at checkout. Tax-relevant fields are unchanged.
- Recurring prices read as amount and interval on one line, on plan cards and in the collapsed mobile summary.
- Receipt PDFs render currency correctly for every exponent, success page amounts are correct, and the logo renders crisply.
- Browsing products works again. The catalog call was failing and the browse tab was showing the failure as an empty result; it now loads, and a genuine fetch failure is surfaced.
Auto-recharge activation
Auto-recharge could not finish activating, for two independent reasons. Both are fixed.- The
setup_intent.succeededevent was missing from the required webhook event list, so no registered endpoint ever received it. The handler that flips auto-recharge from pending to active existed but was never called, and the hosted page sat on “Finishing activation” indefinitely. - Stripe Link was offered on the auto-recharge setup form, and a card set up through Link cannot be charged off-session — so activation could never complete. Link is no longer offered on that form. Other payment methods are unchanged.
- A card captured for a one-time purchase was treated as a valid auto-recharge funding source, so auto-recharge went active with nothing behind it and the first threshold breach failed at Stripe. Card reusability is now recorded at payment time and checked before activation.
- The setup form polls until activation is confirmed, resumes an interrupted 3D Secure return, and shows auto-recharge as pending rather than displaying it as already on.
- Threshold defaults and the trigger-time top-up amount are corrected, and the setting stays in sync across account tabs.
SDK contract additions
All additive. Existing integrations see new optional fields and can ignore them.getCreditActivityon@solvapay/serverreturns the account-wide credit ledger, backed byGET /v1/sdk/credits/activity.- The merchant record carries city, region, and website.
LimitResponsecarries measuredusedandlimitwhen the backend measured a finite cap. Previously the response dropped both and clients had to reconstruct the cap from a field the backend resets to zero. Absent means unmeasured, not zero.- The payment-method contract exposes
reusable, so you can tell a chargeable saved card from a one-off card on file. - The MCP bootstrap payload seeds
limits, so a client renders remaining included usage without a secondcheckLimitscall. - Attach and confirm accept
customerCountry,customerState, andcustomerPostalCode. - Usage events record the tool name when the payable handler knows it.
Console
- A saved plan is now described by a Features summary — the price headline, the plan type, and a line for everything the headline did not already state: included usage, overage, trial, setup fee, discounts, rollover, tiers, and additional currencies. The “start from a template” chooser only appears while you are creating a plan that does not exist yet.