docs: add stripe webhook and oauth setup guide#2971
docs: add stripe webhook and oauth setup guide#2971dsk-dev-ai wants to merge 5 commits intofossasia:devfrom
Conversation
Reviewer's GuideAdds a new Stripe integration setup guide document detailing how to configure Stripe webhooks and OAuth (Connect) for Eventyay, including required endpoints, events, secrets, redirect URIs, expected flow, and common troubleshooting tips. Sequence diagram for Stripe OAuth Connect onboarding flowsequenceDiagram
actor Organizer
participant Frontend
participant Stripe
participant Backend
participant Database
Organizer->>Frontend: Click Connect_Stripe
Frontend->>Stripe: Redirect to Stripe OAuth with client_id and redirect_uri /_stripe/oauth_return/
Stripe->>Organizer: Display onboarding screens
Organizer->>Stripe: Provide account and payout details
Stripe-->>Frontend: Redirect browser to /_stripe/oauth_return/ with auth_code
Frontend->>Backend: POST /_stripe/oauth_return/ with auth_code
Backend->>Stripe: Exchange auth_code for Stripe account details
Stripe-->>Backend: Return Stripe account_id and tokens
Backend->>Database: Store Stripe account connection for organizer
Backend-->>Frontend: Return success status
Frontend-->>Organizer: Show Stripe_connected confirmation
Sequence diagram for Stripe webhook event handlingsequenceDiagram
participant Stripe
participant Backend
participant Database
Stripe->>Backend: POST /api/v1/stripe/webhook with event_payload and signature
Backend->>Backend: Verify signature using webhook_signing_secret
Backend->>Backend: Parse event_type
alt checkout_session_completed
Backend->>Database: Mark order as paid and finalize registration
else payment_intent_succeeded
Backend->>Database: Update payment status to succeeded
else payment_intent_payment_failed
Backend->>Database: Update payment status to failed
else charge_refunded
Backend->>Database: Mark order as refunded and adjust balances
end
Backend-->>Stripe: Respond 200 acknowledgment
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider clarifying which URLs are frontend vs backend (e.g., why webhooks use :5000 and OAuth redirects use :3000 in local development) so users know which service should be running on each port.
- It may be helpful to explicitly call out that
your-domain.comshould be replaced with the actual backend/API domain used by Eventyay deployments, and whether this differs from the public frontend domain.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider clarifying which URLs are frontend vs backend (e.g., why webhooks use :5000 and OAuth redirects use :3000 in local development) so users know which service should be running on each port.
- It may be helpful to explicitly call out that `your-domain.com` should be replaced with the actual backend/API domain used by Eventyay deployments, and whether this differs from the public frontend domain.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
spacing to clear view
clear and final checked and reviewed
I have done all changes plz review it... |
|
I have addressed the feedback regarding frontend vs backend URLs and domain clarification. Please review. Thank you! |
Fixes #2969
Description
This PR adds a complete Stripe integration setup guide including:
The documentation helps users configure Stripe without trial and error.
Type
Summary by Sourcery
Add a dedicated guide for configuring Stripe webhooks and OAuth integration in Eventyay.
Documentation: