Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stripe callback - customer.subscription.created #147

Open
3 of 12 tasks
adnjoo opened this issue Nov 13, 2024 · 0 comments
Open
3 of 12 tasks

stripe callback - customer.subscription.created #147

adnjoo opened this issue Nov 13, 2024 · 0 comments

Comments

@adnjoo
Copy link
Owner

adnjoo commented Nov 13, 2024

related #91

on subscribe,

TODO: Pro Plan Subscription Workflow

Database Setup

  • Ensure users table is updated with stripe_customer_id when a new user subscribes.

Webhook Integration

  • Implement webhook handling for Stripe events in stripe-webhook/route.ts:
    • Handle checkout.session.completed event

Feature Access Control

  • Add checks for Pro subscription status across Pro-only features:
    • Verify active Pro status on each feature access request
    • Set session-level flag to indicate Pro access where applicable

Error Handling and Logging

  • Log all webhook events received
  • Log any errors in webhook processing
  • Test error handling for each event type to ensure stability

Testing

  • Write unit tests for manageSubscriptionStatusChange function
  • Simulate Stripe webhook events to verify system response
  • Confirm Pro access controls work as expected for active and canceled users
@adnjoo adnjoo pinned this issue Nov 13, 2024
@adnjoo adnjoo changed the title stripe callback stripe callback - on subscribe Nov 13, 2024
@adnjoo adnjoo changed the title stripe callback - on subscribe stripe callback - customer.subscription.created Nov 13, 2024
@adnjoo adnjoo unpinned this issue Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant