Ref: https://discuss.flarum.org/d/34490
Based on the above discussion I wrote a ticket on our internal planning tool. I think this would be a great first version for a feature that introduces the ability for users to sell things on your community. Please I'd love you to review this and give me your opinions. Please understand that I am strongly believing in building something first and iterating based on needs of subscribers.
Let's add a feature to Payments that allows users to sell things from within a discussion. Some requirements/assumptions:
- Only single payments for now
- Only 1 item/quantity for now
- Use Stripe Connect
- Platform fee is configurable per tag
- Permissions to enable Markets for Groups and Buying for Groups
- A Market is a discussion that contains an item/thing that is for sale.
How I foresee this works from an admin's perspective:
- Go to Permissions Admin page to change the permission "Create Markets" and "Buy from Markets" for specific user groups. These permissions need to be restrictable per tag, not global!
- Go to Tags admin page
- Edit tag, shows TagEditModal
- Modal shows Toggle to enable tag for "Markets", if toggled on show numeric input for platform fee percentage (can be 0)
How I foresee this works from a users Merchant perspective:
- User goes into User Settings - Payments page
- User sees a button "Connect to Stripe" to create a Connect account. Or a button "Connected to Stripe" which should allow updating/resyncing this connection if ANY tag has "Markets" enabled and they're part of a group that have the permission "Create Markets"
- User sees a new button on the home page called "Create Market" which opens a Discussion Composer where the tags are filtered by those that have "Markets" enabled and a custom input form with a currency and amount field.
How I foresee this works from a users Buyer perspective:
- User can see any Market Discussion, but only sees the "Buy this" button if they're part of a group with the "Buy from Markets" group.
- The "Buy this" button opens a modal that initiates the Stripe payment form, like the other payment methods (if possible).
- Once the user completes the payment the Buy this button will be removed and the discussion locked.
- An event post is created in the discussion showing which user bought it.
Considerations:
How do the currency input effect the stripe functionality, is it possible?
Payments extension discuss: https://discuss.flarum.org/d/26095
Payments extension: https://flarum.org/extension/blomstra/payments