Needs approval
9h agonpm install stripe @stripe/stripe-js
Installs the Stripe Node SDK and browser elements into ~/src/lumen-shop. Writes package.json and lockfile.
bash·Migrate checkout to Stripe
Migrate checkout to Stripe
dev-box · ~/src/lumen-shop
Claude Code · claude-opus-4.6
I'll inspect the current checkout flow and any Stripe env usage first, then replace createMockCharge with Payment Intents without touching the order schema.
export async function CheckoutForm({ cart }: Props) {
const order = await createOrder(cart)
const charge = await createMockCharge(order.total)
return <Confirm clientSecret={charge.id} />
}export async function createOrder(cart: Cart) {
return db.orders.insert({ total: cart.total, status: "pending" })
}Checkout currently calls createMockCharge. I'll add a Stripe client, create a PaymentIntent for order.total, and thread clientSecret into the existing confirm step.
+ import Stripe from "stripe"++ export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!)++ export async function createPaymentIntent(amount: number) {+ return stripe.paymentIntents.create({+ amount,+ currency: "usd",+ automatic_payment_methods: { enabled: true },+ })+ }
const order = await createOrder(cart)- const charge = await createMockCharge(order.total)- return <Confirm clientSecret={charge.id} />+ const intent = await createPaymentIntent(order.total)+ return <Confirm clientSecret={intent.client_secret!} />
Edits are in. I need to install the Stripe SDK on the host before the typecheck will pass — waiting on your approval for the install.
Needs approval
9h agonpm install stripe @stripe/stripe-js
Installs the Stripe Node SDK and browser elements into ~/src/lumen-shop. Writes package.json and lockfile.