SWTP Stripe checkout — Brandon signup playbook¶
Step-by-step guide for the Stripe account setup that has to happen Brandon-side before the checkout flow can go live. The Cloudflare Worker code is already written and staged at D:\claude_www\projects\website_design_manager\swtp-stripe-checkout\src\worker.js. The moment the test-mode keys below are in hand, deploy is mechanical.
Total Brandon time: ~45 minutes (most of it is filling forms; signup is straightforward).
Why this playbook exists¶
The cart and "Secure checkout" button on superiorwatertruckparts.com/cart/ are already wired to POST line items to /api/sp/checkout-session and redirect to whatever Stripe URL comes back. The cart was built that way 2026-05-22 in anticipation of this exact step. The endpoint just doesn't exist yet — it's a 404 today. The CF Worker provides that endpoint. The Worker needs Brandon's Stripe API keys before it can talk to Stripe.
Phase 1 — Stripe signup (30 min)¶
☐ 1. Open https://dashboard.stripe.com/register¶
Use a Google account, email, or Apple ID you'll be the long-term owner of (this isn't transferable — pick the right account first time).
☐ 2. Email verification¶
Stripe sends a code. Enter it.
☐ 3. Country: United States, Business type: Company¶
(Not individual / sole prop. ATG is structured as an entity.)
☐ 4. Business details¶
Fill in:
- Legal business name: "Superior Water Truck Parts" — or the actual registered LLC name (e.g., Superior Equipment Inc d/b/a Superior Water Truck Parts, if that's how SWTP is filed with AZ). Use the name on your federal EIN paperwork.
- EIN / tax ID: the SWTP EIN, or the parent SEI EIN if SWTP isn't separately filed.
- Industry: "Automotive parts" or "Retail — automotive and transportation equipment."
- Website: https://superiorwatertruckparts.com
- Statement descriptor: SWTP PARTS (max 22 chars — this is what appears on customer bank statements; keep it recognizable so they don't dispute).
- Phone: (602) 437-3980
- Address: 156 E Mohave St, Phoenix AZ 85004
- Owner verification: Stripe will ask for your Tomkins date of birth + last 4 of SSN (standard KYC; they don't run credit, but they're legally required to verify the principal owner).
☐ 5. Bank account for payouts¶
- Add the SWTP business checking account (routing + account numbers).
- Stripe deposits proceeds 2 days after each charge (standard rolling payout — adjustable later).
☐ 6. Two-factor auth¶
Set up 2FA on the Stripe dashboard login. Authenticator app preferred over SMS.
Phase 2 — Get the API keys (5 min)¶
☐ 7. Test-mode keys — for our initial deploy¶
In the dashboard, top-left should show "Test mode" toggle on. Confirm it's ON.
Navigate to Developers → API keys:
- Publishable key: starts with pk_test_... — public, can live in client-side code (we won't need it; our flow is server-side only)
- Secret key: starts with sk_test_... — secret, server-only. Click "Reveal test key" and copy it.
Send the sk_test_... to WDM via Mattermost DM (do not paste in email or commit to git). I'll set it on the Worker via:
☐ 8. Webhook signing secret — for order notifications¶
In the dashboard (still in Test mode): Developers → Webhooks → Add endpoint.
- Endpoint URL:
https://superiorwatertruckparts.com/api/sp/webhook(this routes to our CF Worker) - Events to listen to: select just
checkout.session.completedfor now - Save → Stripe shows the Signing secret (starts with
whsec_...)
Click reveal, copy. Send the whsec_... to WDM via Mattermost DM.
Phase 3 — Stripe Tax setup (10 min)¶
Sales tax is a real concern — Arizona has TPT (transaction privilege tax) at the state + city level, and multi-state buyers may trigger nexus elsewhere. Stripe Tax handles this automatically once configured.
☐ 9. Enable Stripe Tax¶
Dashboard → Tax → Get started → walk the setup wizard.
- Origin address: 156 E Mohave St, Phoenix AZ 85004
- Tax registrations: Arizona is the only one required to start. Stripe will warn if your sales volume triggers other states' nexus thresholds.
- Product tax codes: default to
txcd_99999999(general physical goods) unless any SKU has a special code.
Stripe Tax adds a small per-transaction fee (~0.5% of the transaction), but it's the cleanest way to stay compliant without manually filing in each state we ship to.
☐ 10. Test mode — Stripe Tax in test mode is free and behaves identically¶
Confirm in Tax → Settings that test-mode auto-calculation is ON.
Phase 4 — Mailgun for order-notification emails (optional, ~15 min)¶
This part is optional — if you'd rather use a simpler email path (e.g., have the CF Worker forward to the existing [email protected] via Cloudflare Email Routing, or skip emails entirely and just rely on the Stripe dashboard's order list), let WDM know.
If we want order emails:
☐ 11. Sign up for Mailgun (free tier: 100 emails/day, plenty for SWTP)¶
https://signup.mailgun.com → free trial → verify domain superiorwatertruckparts.com (SPF + DKIM DNS records).
☐ 12. Get Mailgun API key + domain¶
Dashboard → Sending → API keys — copy the private API key.
Dashboard → Sending → Domains — confirm mg.superiorwatertruckparts.com is verified.
Send both to WDM (DM).
Phase 5 — WDM deploys (no Brandon action — for reference)¶
Once WDM has the 4 secrets (STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, optionally MAILGUN_API_KEY + MAILGUN_DOMAIN):
wrangler login(IT-side; one-time CF auth)wrangler secret put STRIPE_SECRET_KEY→ paste sk_test_...wrangler secret put STRIPE_WEBHOOK_SECRET→ paste whsec_...wrangler deploy(publishes to staging worker URL first)- Test flow end-to-end on staging using Stripe test card
4242 4242 4242 4242(any future date, any CVC, any zip) - Verify order email arrives at sales@
wrangler deploy --env production→ binds tosuperiorwatertruckparts.com/api/sp/*- Final smoke test on live with the same test card (still test mode → no real money moves)
Phase 6 — Switch to live mode (Brandon-side decision, when ready)¶
After test-mode flow works end-to-end:
☐ 13. Repeat Phase 2 + 3 + 4 with the live mode toggle¶
- Get
sk_live_...(live secret key) - Get
whsec_...for the live mode webhook (separate from test-mode webhook — Stripe segregates the two) - Stripe Tax registrations in live mode (any tax registrations done in test mode have to be re-done; test ≠ live data)
Send the live secrets to WDM. WDM swaps the Worker secrets (wrangler secret put STRIPE_SECRET_KEY overwrites). One-line config change in wrangler.toml to flip the route binding. Live within ~5 minutes.
☐ 14. Activate account¶
Stripe holds the first payouts until the account is fully activated. The dashboard will show a "Complete your account" banner with anything still missing — usually it's just additional ID verification on the principal owner.
What this gets us¶
After Phase 5 (still in test mode): - Cart "Secure checkout" button works end-to-end with Stripe test cards - Customer flow: add to cart → checkout → Stripe-hosted payment page → success page → order email - Shipping options shown to customer: - Phoenix yard pickup (free, same-day before 2pm AZ) - Free freight (orders over $500) - Standard freight $45 placeholder for orders under $500 (Worker flags these as "freight quote needed" so sales follows up before shipping) - Tax auto-calculated for AZ + any nexus states - Order notification email lands in [email protected]
After Phase 6 (live mode): - All of the above, but real money moves.
Estimated cost (recurring)¶
- Stripe processing fees: 2.9% + $0.30 per successful card charge. No monthly fee.
- Stripe Tax: ~0.5% per transaction (only on transactions where tax is calculated).
- Cloudflare Worker: free tier covers up to 100,000 requests/day. SWTP traffic will be far below that — $0/mo.
- Mailgun: free tier (100 emails/day) is plenty. $0/mo.
Total marginal cost per $100 order: ~$3.50 (Stripe processing + tax). No fixed monthly overhead.
What's NOT included in v0.1 (deferred to follow-ups)¶
- Customer accounts. Today the flow is guest-only. Account creation + saved cards = post-MVP work, gated on Brandon wanting it.
- Stripe Customer Portal for self-serve receipts / refunds. Same — easy to add later.
- Coupon codes / promotions. Stripe supports them; we'd add the UI in cart-page.js once needed.
- Build-kit mailto: replacement. The build-kit quote forms (SP-BUILD-KIT-2K, SP-BUILD-KIT-4K) still use the mailto: fallback because those are typically negotiated; we don't want them in self-serve checkout yet. Easy to flip later if you decide otherwise.
- Phone-order Stripe pay-links. If a customer calls in, we'd want a quick way for receptionist to send them a Stripe pay-link. Possible follow-up; not in v0.1.
- Real freight integration. Currently the $45 under-$500 freight is a placeholder + manual quote-follow-up via email. Integrating a real freight API (Goodyear Logistics doesn't have a public API — would need a different carrier integration) is a substantial project.
— WDM, 2026-05-30