Skip to content

docs(payments): review the payments reference and merge the service role methods into it - #364

Merged
wixysam merged 3 commits into
mainfrom
sdk-payments-docs
Nov 3, 2026
Merged

wixysam merged 3 commits into
mainfrom
sdk-payments-docs

Conversation

@wixysam

@wixysam wixysam commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Reviews the payments reference and changes the docs pipeline so the user and service role methods share one page. The regenerated docs go in a separate docs PR.

Payments page

  • Overview: a capability list for the whole module, a Providers table, and Authentication modes. The Errors paragraph moves to the PaymentsErrorCode intro.
  • One page: ServiceRolePaymentsModule is appended as "Service role methods", and PaymentsErrorCode sits under an "Errors" heading.
  • Method order follows the checkout flow: preloadCheckout(), mountCheckout(), completeCheckout(), listPurchases(), and on the service role, createCheckout(), completeCheckout(), listPurchases(), and then refunds and subscriptions.
  • Content:
    • createCheckout() explains redirect and embedded checkouts.
    • listPurchases() says why PayPal needs a checkout_id or subscription_id.
    • The user methods link to their service role versions.
    • The service role completeCheckout() stands on its own.
  • Examples: shorter tab titles, a plain preloadCheckout() call, a Stripe success page example, and a backend example that confirms a purchase before granting access.
  • Naming: "Wix Payments" is now "Base44 Payments", the product name. The first mention is "Base44 Payments powered by Wix".

Pipeline

  • Appended modules: an appended module's section is headed with its interface name, so typesWithOwnMethods in page-sections.json can rename it. The connectors and integrations special cases now match ## UserConnectorsModule and ## CustomIntegrationsModule, and their output doesn't change.
  • Links: links back to the host module, or to an appended module by its slug, become same-page anchors.
  • Returns sections: a Returns section shows the method's @returns text, and falls back to the return type's description only when there's none. Before, both showed, as in "A mounted embedded checkout." followed by "Promise resolving to the mounted checkout once it renders." This removes about 90 generic lines across the App SDK reference and 5 in the Platform SDK. Two descriptions with details that appear nowhere else moved into @returns:
    • createCheckout()
    • openLiveSession() on useChat()
  • Helper types: AiGatewayConnectionOptions, ConnectorApiRequest, and ConnectorApiResponse already render inline, so they're on the delete-after-processing list and no longer show up as modules in the nav.

Also in this PR

  • AI Gateway: the video generation JSDoc from docs(ai-gateway): document video generation #305, plus four punctuation fixes that are already live on the published page. Without them, a regen from main would remove the published Video section. docs(ai-gateway): document video generation #305's other two commits are already covered on main, so it can be closed after this merges.
  • Connectors: a style and accuracy pass on the metered connectors section, callApi(), and its request and response types:
    • house style, with no em dashes, colon breaks, or status codes in prose
    • "credits" instead of "integration credits", now that metered calls bill unified credits
    • callApi()'s integration type no longer points at the Available connectors table, which lists getConnection() connectors only
  • sdk-docs-writing skill:
    • when {@link} can't be used: methods on another page, and methods mentioned in type or property comments
    • plain calls first in examples, with a React tab only when needed
    • "the current user"

Checks

  • App SDK: npm test, 430 passing
  • Platform SDK: test:types, plus test:unit with 160 passing
  • Lint: npm run lint is clean
  • Regen: create-docs for both packages. Reviewed the output page by page.

🤖 Generated with Claude Code

…ole methods into it

Payments JSDoc: house-style fixes, a fuller overview, provider and
authentication sections, method order that follows the checkout flow,
cross-links between the user and service role methods, error code links,
and new examples for the Stripe success page and confirming a purchase in
a backend function. "Wix Payments" is now "Base44 Payments", the product
name.

Docs pipeline:
- Append ServiceRolePaymentsModule onto the payments page as "Service role
  methods", and group PaymentsErrorCode under an Errors heading.
- An appended module's section is headed with its interface name, so
  typesWithOwnMethods can rename it. The connectors and integrations
  special cases match the new headings.
- Links back to the host module, or to an appended module by its slug,
  become same-page anchors.
- A Returns section shows the method's @returns text and only falls back to
  the return type's description when there is none.
- AiGatewayConnectionOptions, ConnectorApiRequest, and ConnectorApiResponse
  render inline and no longer get their own pages.

Also brings in the AI Gateway video JSDoc from #305 and the prose fixes
already published for that page, moves two return-type details into
@returns so they still show, and adds skill rules for links, framework-
neutral examples, and "the current user".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Package Preview Available! (@base44/platform)


Install this PR's preview build with npm:

npm i @base44-preview/platform@0.6.0-pr.364.6994ab8

Prefer not to change any import paths? Install using npm alias so your code still imports @base44/platform:

npm i "@base44/platform@npm:@base44-preview/platform@0.6.0-pr.364.6994ab8"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "@base44/platform": "npm:@base44-preview/platform@0.6.0-pr.364.6994ab8"
  }
}

Preview published to npm registry — try new features instantly!

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/sdk@0.8.58-beta.0-pr.364.6994ab8

Prefer not to change any import paths? Install using npm alias so your code still imports @base44/sdk:

npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.58-beta.0-pr.364.6994ab8"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "@base44/sdk": "npm:@base44-preview/sdk@0.8.58-beta.0-pr.364.6994ab8"
  }
}

Preview published to npm registry — try new features instantly!

House-style fixes: no em dashes, prose semicolons or colon breaks, no status
code in prose, contractions, and plain code names instead of {@link} on
properties, where the pipeline drops the link. Says "credits" now that
metered calls bill unified credits, counts the three tips correctly, and
stops pointing callApi()'s integration type at the Available connectors
table, which lists getConnection() connectors only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the docs-draft PR has auto-drafted documentation suggestions label Nov 3, 2026
The Returns rule now shows @returns instead of the return type's
description, so carry the type's detail into @returns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wixysam
wixysam merged commit 4425d2c into main Nov 3, 2026
8 of 9 checks passed
@wixysam
wixysam deleted the sdk-payments-docs branch November 3, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-draft PR has auto-drafted documentation suggestions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants