Rebasely Beta: data may be purged

examples/storefront Public

Move payments into its own Worker #2

Changed files

30 files changed345 additions238 deletionssince main at 94db762

View checkout

1 component added, 2 changed, 1 removed, 3 connections added, 3 connections removed

  • Added
  • Changed
  • Removed

Everything a checkout touches, from the cart to the charge.

What this pull request changes in the view checkout: 5 components, 7 connections storefront-api to db (d1)storefront-api to payments (rpc): addedpayments to storefront-api (rpc): addedpayments to stripe (https): addedstorefront-api to stripe (https): removedstripe-webhook to storefront-api (rpc): removedstripe-webhook to stripe (webhooks): removedd1rpcrpchttpshttpsrpcwebhooksstorefront-api (changed)storefront-apiWorker · changedpayments (added)paymentsWorker · addeddbdbD1 databasestripe (changed)stripeExternal · changedstripe-webhook (removed)stripe-webhookWorker · removed

The view checkout at the head of this pull request, with what it adds, changes and removes from the merge base 94db762. Select a component for what changed in it.

storefront-api

The public HTTP API (wrangler.jsonc, Worker storefront-api). Shoppers browse the catalog, fill carts and check out; the merchant edits products and uploads their images with the admin token. Its OrdersService entrypoint is how the other Workers change orders: it is the only Worker with the database binding. A cron trigger expires unpaid orders every five minutes. Payments go through the payments Worker; this Worker has no Stripe key.

Changed by this pull request:

  • description

Connections: storefront-api → payments added, payments → storefront-api added, storefront-api → stripe removed, stripe-webhook → storefront-api removed.

Takes part in Checking out a cart, Uploading a product image, Expiring an unpaid order, Fulfilling a paid order.

Changes

  • Changed: ~ view checkout: components +payments −stripe-webhook
  • Changed: ~ storefront-api: description
  • Added: + component payments (worker)
  • Changed: ~ stripe: description
  • Removed: − component stripe-webhook (worker)
  • Added: + edge storefront-api → payments (rpc)
  • Added: + edge payments → storefront-api (rpc)
  • Added: + edge payments → stripe (https)
  • Removed: − edge storefront-api → stripe (https)
  • Removed: − edge stripe-webhook → storefront-api (rpc)
  • Removed: − edge stripe-webhook → stripe (webhooks)

Knowledge base

Back to the conversation