Stripe integration: payment links and webhook for service requests #125
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Child of spike #121 (client request flow design). Spans Phase 3-4. Depends on admin request management ticket.
Repo
ldraney/landscaping-assistantUser Story
As admin, I want to generate Stripe payment links from the app (not manually) and have payments auto-update request status so the workflow is seamless.
Context
V1 of admin request management uses manually pasted Stripe links. This ticket adds Stripe API integration: admin clicks "Send Payment Link" and the app generates it via Stripe's API. A webhook endpoint listens for payment confirmation and auto-transitions the ServiceRequest to "paid" status.
Requires a public endpoint for Stripe webhooks — the existing Tailscale Funnel setup provides this.
File Targets
app/services/stripe_service.rb(new)app/controllers/webhooks/stripe_controller.rb(new)config/routes.rb(add webhook endpoint)Gemfile(add stripe gem)spec/services/stripe_service_spec.rb(new)spec/requests/webhooks/stripe_spec.rb(new)Acceptance Criteria
Test Expectations
spec/services/stripe_service_spec.rb: link generation (stubbed HTTP)spec/requests/webhooks/stripe_spec.rb: valid webhook, invalid signature, idempotencybundle exec rspecConstraints
Checklist
Related
docs/networking.md— Tailscale Funnel for public webhook endpoint