Fundraising Marketplace: A Stripe Connect example app

An example application built using Stripe Connect custom accounts. This application is provided as an example, but isn't meant to be run in production.

Dashboard demo

Payout demo

Charge view demo

Demo

You can find a working demo of this application deployed and running in test mode at https://stripe-marketplace-demo.herokuapp.com/. Feel free to create an account, create a campaign, and make donations to see some data populated in the dashboard. You can find test card numbers, bank accounts, and identity verification details in Stripe's documentation.

Features

💸 Create fundraising campaigns and custom Stripe Connect accounts.

🔒 Uses Devise for user authentication.

📈 Fairly complete seller dashboard to view charges, create refunds, view payouts, etc.

📱 Fully responsive for mobile browsers.

🏦 Add and modify connected bank accounts.

💳 Make donations with either Stripe Elements or Stripe Checkout. Make successful donations using valid test card numbers or see declines using test cards.

😎 Take a 10% application fee from connected accounts for successful charges.

⚡ Create payouts to debit cards using instant payouts and take a 3% platform fee in return using account debits.

📋 Identity verification example form and dashboard prompt to work through the identity verification process. Includes examples of collecting all info up front vs incrementally.

💩 Create disputes and use webhooks to recover funds + dispute fees automatically via account debits.

↪️ Includes webhook signature validation for enhanced security.

Shortcomings, things still needed

  • Still pretty basic integration tests.
  • Email receipts/notifications/etc.
  • Additional features like pagination for charges/transfers, ACH payments, alternative payment methods, etc.

Specs

Built on Rails 5 and running Ruby 2.2. Uses the 2019-02-19 API version, which includes major chages to the way Connect onboarding works.

Setup

To run this locally, clone the repository and run bundler to install dependencies:

git clone https://github.com/adam-stripe/stripe-connect-managed-rails.git
cd stripe-connect-managed-rails
bundle install

Migrate:

$ rails db:migrate

Retrieve your Stripe API keys and set them as environment variables. You can run this app locally by starting Rails server:

PUBLISHABLE_KEY=YOUR_STRIPE_PUBLISHABLE_KEY SECRET_KEY=YOUR_STRIPE_SECRET_KEY ENDPOINT_SECRET=YOUR_WEBHOOK_ENDPOINT_SECRET rails s