{"action":"created","issue":{"url":"https://api.github.com/repos/sudoroom/sudo-humans/issues/33","labels_url":"https://api.github.com/repos/sudoroom/sudo-humans/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/sudoroom/sudo-humans/issues/33/comments","events_url":"https://api.github.com/repos/sudoroom/sudo-humans/issues/33/events","html_url":"https://github.com/sudoroom/sudo-humans/issues/33","id":103466226,"number":33,"title":"Implement additional recurring payments (besides membership dues)","user":{"login":"wrought","id":764063,"avatar_url":"https://avatars.githubusercontent.com/u/764063?v=3","gravatar_id":"","url":"https://api.github.com/users/wrought","html_url":"https://github.com/wrought","followers_url":"https://api.github.com/users/wrought/followers","following_url":"https://api.github.com/users/wrought/following{/other_user}","gists_url":"https://api.github.com/users/wrought/gists{/gist_id}","starred_url":"https://api.github.com/users/wrought/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wrought/subscriptions","organizations_url":"https://api.github.com/users/wrought/orgs","repos_url":"https://api.github.com/users/wrought/repos","events_url":"https://api.github.com/users/wrought/events{/privacy}","received_events_url":"https://api.github.com/users/wrought/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-27T09:23:39Z","updated_at":"2015-08-27T10:37:57Z","closed_at":null,"body":"__Stripe API Research:__ It seems there are lots of different options to adapt the existing Stripe integration to enable users to pay an additional regular fee for use of a sudo room locker.\r\n\r\n1. First of all, [Stripe actually supports multiple subscriptions for a given user](https://stripe.com/blog/multiple-subscriptions) since [Subscriptions](https://stripe.com/docs/api#subscriptions) and [Plans](https://stripe.com/docs/api#plans) are first-class API objects.\r\n    1. __Drawback:__ This generates multiple recurring invoices, each of which could be started and charged at different times. There are some alternatives below.\r\n    1. Additionally, Plans can be generated on the fly, so for each user, we can create a unique plan based on whatever costs they have incurred and the rates they wish to pay.\r\n        1. Imagine filling out a form selecting: (a) membership dues amount and (b) check-boxes for additional fixed fees (e.g. locker). The total is summed and submitted to Stripe as a new plan, to which the user is subscribed and pays on a recurring basis.\r\n        1. Creating a Plan and creating a Subscription to subscribe the user to the newly created plan is documented in [this tutorial](https://stripe.com/docs/tutorials/subscriptions) as well.\r\n2. Importantly, __1.__ above does not reflect how the Stripe integration currently works in `sudo-humans`. Currently, at `/~user/payment` the user is presented with a list of Plans, from which the user can choose one and submit their new subscription. The user is also able to update or cancel their subscription. In order to maintain how the Stripe integration currently works, we would create new plans that matched all the existing plan options, but with varying locker fees.\r\n    1. __Drawback:__ This would create way too many options (especially unnecessary or seemingly redundant ones)! I don't see there being a strong reason to keep things the way they are...\r\n3. There are yet other ways to [Change the Amount Billed](https://stripe.com/docs/guides/subscriptions#changing-the-amount-billed), but most of them are not recurring and would require some action by the user or the `sudo-humans` application to add to the user's existing subscription--each month (or whatever interval).\r\n    1. Except, one clever work-around is to hack the _Plans_ object by creating a __$1 plan__ and using the [Quantities](https://stripe.com/docs/guides/subscriptions#setting-quantities) object to easily build custom membership contributions for each user (tacking on extra costs such as with checkboxes as described above):\r\n        * _\"As another example, if the amount each customer pays can vary greatly, you could end up with too many plans to address all possible cases, and yet still need to create new plans for new situations. Alternatively, you could create a $1 plan and subscribe each customer to the appropriate quantity, thereby creating virtual $5 plans, $8 plans, $17 plans, and so forth.\"_\r\n\r\n__Proposal:__ Given my research and evaluation, I think we should replace the current Stripe integration with the option described in __3.i.__ above:\r\n1. Deprecate the old Plans.\r\n2. Create $1 Plans that vary by payment period (weekly vs monthly vs annual, etc)\r\n3. Utilize the Quantity parameter to build the user's selected payment plan into a recurring membership rate of their choice.\r\n4. Further increase the Quantity value based on whatever additional fees, services, etc.\r\n\r\n__Alternatively:__ The otherwise most comprehensive solution (but perhaps also cumbersome) would be based on __1.__ above&mdash;to allow users to create multiple subscriptions depending on what they want to contribute and whatever additional fees they incur through services, etc. \r\n\r\n__Note:__ Both of these options (proposal & alternatively) have a drawback of obfuscating the different costs because the invoice will only reflect a final tally. Perhaps that's okay, though!"},"comment":{"url":"https://api.github.com/repos/sudoroom/sudo-humans/issues/comments/135376135","html_url":"https://github.com/sudoroom/sudo-humans/issues/33#issuecomment-135376135","issue_url":"https://api.github.com/repos/sudoroom/sudo-humans/issues/33","id":135376135,"user":{"login":"wrought","id":764063,"avatar_url":"https://avatars.githubusercontent.com/u/764063?v=3","gravatar_id":"","url":"https://api.github.com/users/wrought","html_url":"https://github.com/wrought","followers_url":"https://api.github.com/users/wrought/followers","following_url":"https://api.github.com/users/wrought/following{/other_user}","gists_url":"https://api.github.com/users/wrought/gists{/gist_id}","starred_url":"https://api.github.com/users/wrought/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wrought/subscriptions","organizations_url":"https://api.github.com/users/wrought/orgs","repos_url":"https://api.github.com/users/wrought/repos","events_url":"https://api.github.com/users/wrought/events{/privacy}","received_events_url":"https://api.github.com/users/wrought/received_events","type":"User","site_admin":false},"created_at":"2015-08-27T10:37:56Z","updated_at":"2015-08-27T10:37:56Z","body":"@Juul what do you think about using the $1 + Quantity hack? It seems like it will make our stripe integration robust to the lockers-fee use case as well as any other fees...\r\n\r\nping @substack in case you have thoughts too"}}