An example app illustrating accepting ACH payments with Stripe. Find more about this in Stripe's ACH documentation.
You can find a demo of this application running at https://stripe-ach-example-app.herokuapp.com/.
There are test credentials for Plaid available in their docs and you can find test routing and account numbers for manual bank account entry in Stripe's ACH docs.
- Authenticate bank accounts with Plaid Link.
- Accept manual entry of bank account details and microdeposit verification.
- Create ACH charges for an amount the customer selects.
- View all payments made by the current customer using the list charges method.
- This example tries to favor readability and simplicity but isn't mean to be run in production.
- This example just stores a customer ID in a session, but IRL you'll probably want to store this in your database.
- JavaScript is inlined for easier readability if you're not familiar with navigating Rails and the asset pipeline.
If you'd like to run this application locally follow the instructions below to get up and running.
$ git clone [email protected]:adamjstevenson/example-stripe-ach-rails.git
Sign up for a Plaid account.
After creating your Plaid account, connect it to your Stripe account. Visit the Integrations page within Team Settings and click Connect under Stripe.
Configure the application with your Stripe and Plaid API keys. The application accesses these keys via environment variables that are defined in .env
. Create a .env
file by copying .env.sample
:
$ cp .env.sample .env
Replace the values after each equal sign with your Stripe and Plaid API keys:
PLAID_CLIENT_ID=XXXXXXXXXXXXXXXXXXXXXXXX
PLAID_SECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
PLAID_PUBLIC_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
STRIPE_PUBLISHABLE_KEY=pk_test_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
STRIPE_SECRET_KEY=sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
$ bundle install
$ rails server
Your application should now be running on your local machine. You can access it by visiting http://localhost:3000.