Repository navigation
Add Stripe payments submodule - #5906
Open
bradleyshep wants to merge 90 commits into
Open
bradleyshep wants to merge 90 commits into
bradleyshep wants to merge 90 commits into
Conversation
Merge reviewed core updates. Use camelCase TypeScript exports, Apache-2.0 licensing, and direct SDK updates. Search full organization subscription history and cover the former 5000-row cutoff with a regression test.
Configure fixed policies once, expose stable errors, keep installers idempotent, and support admin revocation. Remove internal sweep exports and align init naming. Verify packed consumers with the default TypeScript template.
Merge reviewed core changes and standardize install. Keep failed HTTP events retryable and reject failed relay payloads. Add signed HTTP redelivery and recovery cases to the existing smoke test, with explicit public exports and updated documentation.
An email match could hand one user another user's customer and saved payment methods.
Drop the install options, the standalone install and sweep exports, and helpers exported only for tests. runSweep and resetBuckets share one maxRows validation.
Store the event created time on customer, subscription, Checkout session, and invoice rows, and ignore events that are older or would move a status backward, including replays. Record Checkout payment_status and handle the async payment events. Read invoice subscriptions from both invoice shapes and link invoice PaymentIntents through invoice_payment.paid on API versions from 2025-03-31.basil.
client({ handlers }) imports the SDK directly and returns the tables,
install, submit, views, and reducers. Contexts are typed against the
retry tables instead of unknown, and thrown codes come from an exported
errors object.
retryHandler no longer defines a property on the caller's type builder,
so one builder can back several handlers. The custom auth policy is
replaced by submit(), which host reducers call after their own checks.
History is written once per attempt with its final status, pruned by
removing the oldest row through the ranAt index, and served newest first
without sorting. The unused taskName and status indexes are removed,
admin rows store addedAt as a timestamp, and the task view returns the
newest tasks.
The SDK peer dependency was `workspace:^`, which packs as the unpublished 2.13.0. It is now `^2.12.0`. Declarations failed to build against 2.12 because inferred table, schema, reducer, procedure, and view types referenced SDK types 2.12 does not export. Exports now carry explicit types from public SDK names, with each table's options and columns and each operation's arguments and results defined once. The README installs a matching SDK, states the 2.12 minimum, links the example on GitHub, and links the license text.
`npm install <pkg> spacetimedb@^2.12.0` rewrote the `2.12.*` pin that `spacetime init` sets, which would pull a newer SDK into a project with a 2.12 CLI and server once one is published. The README install line now adds only the package; npm still checks the peer range. Comments that described a table, enum, or operation sat between its hoisted declarations and the export. They again precede everything they describe.
Contributor
Author
|
Updates:
stripe-demo.mp4 |
… drop the unused appUserId column
…payments # Conflicts: # pnpm-lock.yaml
…ighten config and paths, remove admin checkout
…e on the same second
Contributor
Author
|
@clockwork-tien
|
clockwork-tien
approved these changes
Nov 16, 2026
Contributor
Author
|
@cloutiertyler need code owner review on this for the license |
cloutiertyler
approved these changes
Nov 20, 2026
cloutiertyler
left a comment
Contributor
There was a problem hiding this comment.
Approving the license.
bradleyshep
enabled auto-merge
November 20, 2026 16:22
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
Adds a Stripe submodule that mirrors customers, subscriptions, Checkout sessions, invoices, and payments into private SpacetimeDB tables.
stripe_refund, and payments trackamountRefundedExample screenshots
Stripe
API and ABI breaking changes
None. Adds new TypeScript package APIs.
Rollback safety impact
n/a. Adds opt-in TypeScript packages and examples.
Expected complexity level and risk
2/5
Testing
Removed the unit tests for the deleted
webhook-metadata.tsandvalidateWebhookRequestBody; the shared ingest path covers both.test:smokeandtest:exampleon a local SpacetimeDBtest:billing:liveandtest:stripe:e2ewith Stripe test credentialstest:ui