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

Business subscriptions #158

Closed
joemasilotti opened this issue Dec 16, 2021 · 1 comment
Closed

Business subscriptions #158

joemasilotti opened this issue Dec 16, 2021 · 1 comment
Projects
Milestone

Comments

@joemasilotti
Copy link
Owner

joemasilotti commented Dec 16, 2021

Clicking Message on a developer profile currently navigates to developers/:id/messages/new. Instead, if the user doesn't have an active Business Subscription then they should be redirected to a Stripe Checkout page. If the user isn't signed in then redirect to users/sign_up. If the user doesn't have a business profile then they should be redirected to businesses/new.

The redirects should remember which developer the business wants to message. This can be done with Devise's #stored_location_for. All of this logic can live in ColdMessagesController for now as a user progresses through the steps.

The Stripe Checkout page should offer a single annual subscription for $99 per month. Upon successful charge, Stripe should redirect via success_url back to the remembered URL (messaging the developer).

Also, a webhook should be caught to create the Customer record with Stripe's identifier and the subscription status. The webhook should also listen for changed and failed events to ensure the database is kept up to date with active subscription records in Stripe.

https://stripe.com/docs/billing/subscriptions/build-subscription?ui=checkout


Open source considerations

  • Should we expect contributors to install the Stripe CLI?
  • If so, can I share my test Stripe secret key?
  • If not, we will need:
    • Instructions for setting up a Stripe account
    • To ignore the encrypted development credentials and instructions for how to add individual Stripe keys to a new file
    • Instructions for setting up Stripe locally (Stripe CLI)
    • Instructions (or a script) for adding the price to the Stripe account and adding the price ID to credentials
@joemasilotti joemasilotti added this to the Subscriptions milestone Dec 16, 2021
@joemasilotti joemasilotti added this to To do in Backlog Dec 16, 2021
@joemasilotti joemasilotti changed the title Payments, customers, and subscriptions Business subscriptions Dec 17, 2021
@joemasilotti joemasilotti moved this from To do to In progress in Backlog Dec 17, 2021
@joemasilotti
Copy link
Owner Author

Closed via #168.

Backlog automation moved this from In progress to Done Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

1 participant