The Stripe specs describe an outbox path, a helper and a query the console no longer has #317

Open
opened 2026-10-31 06:23:53 +00:00 by cgalo5758 · 0 comments
Owner

Where

  • openspec/specs/stripe-customer-sync/spec.md: the purpose (line 5), "Stripe Customer is created lazily via the integration outbox" (lines 28-46), and "EnsureStripeCustomer helper provides idempotent enqueue" (lines 48-61).
  • openspec/specs/stripe-integration-infrastructure/spec.md:127, :130; openspec/specs/price-management/spec.md:49, :51-58; openspec/specs/stripe-product-catalog-sync/spec.md:54-68.
  • internal/integrations/stripe/store/README.md:7-13, :48, :57; docs/building-an-integration.md:566-568.

What it says

The outbox is the console's queue of actions for Stripe: a row written in the same database transaction as the change that needs it, run in the background.

  • The customer sync spec says a Stripe customer is created through the outbox when an organization's billing account first does something billable, through a helper, EnsureStripeCustomer, that checks for an existing customer mapping or a queued create and otherwise queues a create_stripe_customer entry; checkout may create a customer directly as an exception. The package README names billing-account creation as what queues the entry, and the integration guide gives EnsureStripeCustomer as its example of a queued write that commits with the caller's own changes.
  • The specs name the outbox table integration.integration_outbox or integration_outbox (infrastructure, customer sync) and integration.outbox (price management, catalog sync, the Stripe package's README).
  • The price management spec requires a CreateOutboxEntry query for writing to it.
  • The catalog sync spec, and the README's data-flow sketch, say that creating a product or a price on the operator pages queues its create in Stripe.

What it should say, or what is missing

  • Checkout is the only place the console creates a Stripe customer, during the checkout request, when the billing account has no customer mapping or has one made in the other Stripe environment (internal/server/billing.go). Nothing queues create_stripe_customer, and EnsureStripeCustomer no longer exists. The create_stripe_customer executor is still there, so the spec can keep that requirement while saying nothing in the console writes such an entry. The helper's requirement and the "first billable event" scenario go. The README says nothing queues it, and the integration guide's example becomes the catalog sync, whose mapping writes and queued creates commit in one transaction.
  • The table is core.outbox, as the infrastructure spec's own outbox requirement already says.
  • Rows are written with integration.Enqueue or integration.EnqueueAt; there is no CreateOutboxEntry query, so that requirement names the helper or goes.
  • Creating a product or a price queues nothing: the product page's Sync to Stripe is the only thing that queues the product and price creates, which the price management spec already says. The catalog sync requirement is reworded to that, and the README's sketch starts from Sync to Stripe.
### Where - `openspec/specs/stripe-customer-sync/spec.md`: the purpose (line 5), "Stripe Customer is created lazily via the integration outbox" (lines 28-46), and "EnsureStripeCustomer helper provides idempotent enqueue" (lines 48-61). - `openspec/specs/stripe-integration-infrastructure/spec.md:127`, `:130`; `openspec/specs/price-management/spec.md:49`, `:51-58`; `openspec/specs/stripe-product-catalog-sync/spec.md:54-68`. - `internal/integrations/stripe/store/README.md:7-13`, `:48`, `:57`; `docs/building-an-integration.md:566-568`. ### What it says The outbox is the console's queue of actions for Stripe: a row written in the same database transaction as the change that needs it, run in the background. - The customer sync spec says a Stripe customer is created through the outbox when an organization's billing account first does something billable, through a helper, `EnsureStripeCustomer`, that checks for an existing customer mapping or a queued create and otherwise queues a `create_stripe_customer` entry; checkout may create a customer directly as an exception. The package README names billing-account creation as what queues the entry, and the integration guide gives `EnsureStripeCustomer` as its example of a queued write that commits with the caller's own changes. - The specs name the outbox table `integration.integration_outbox` or `integration_outbox` (infrastructure, customer sync) and `integration.outbox` (price management, catalog sync, the Stripe package's README). - The price management spec requires a `CreateOutboxEntry` query for writing to it. - The catalog sync spec, and the README's data-flow sketch, say that creating a product or a price on the operator pages queues its create in Stripe. ### What it should say, or what is missing - Checkout is the only place the console creates a Stripe customer, during the checkout request, when the billing account has no customer mapping or has one made in the other Stripe environment (`internal/server/billing.go`). Nothing queues `create_stripe_customer`, and `EnsureStripeCustomer` no longer exists. The `create_stripe_customer` executor is still there, so the spec can keep that requirement while saying nothing in the console writes such an entry. The helper's requirement and the "first billable event" scenario go. The README says nothing queues it, and the integration guide's example becomes the catalog sync, whose mapping writes and queued creates commit in one transaction. - The table is `core.outbox`, as the infrastructure spec's own outbox requirement already says. - Rows are written with `integration.Enqueue` or `integration.EnqueueAt`; there is no `CreateOutboxEntry` query, so that requirement names the helper or goes. - Creating a product or a price queues nothing: the product page's Sync to Stripe is the only thing that queues the product and price creates, which the price management spec already says. The catalog sync requirement is reworded to that, and the README's sketch starts from Sync to Stripe.
cgalo5758 added the
kind
docs
area/billingarea/integrations
labels 2026-10-31 06:23:53 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wiki-cafe/member-console#317