---
title: Announcing fake_stripe
teaser: 'A fake to test your Stripe code without hitting Stripe''s servers.

  '
tags: news,testing,rails,open source
author: Melanie Gilman
published_on: 2016-05-24
---

We like to use [Stripe] for payment processing in our clients'
applications and in our own. That's why we created [fake_stripe], a gem that makes
testing your Rails app against Stripe much easier. fake_stripe spins up a local
server that acts like Stripe's and also serves a fake version of [Stripe.js],
Stripe's JavaScript library that allows you to collect your customers' payment
information without ever having it touch your servers. It spins up when you run your
feature specs, so that you can test your purchase flow without hitting Stripe's
servers or making any external HTTP requests.

[Stripe]: https://stripe.com/
[fake_stripe]: https://github.com/thoughtbot/fake_stripe
[Stripe.js]: https://stripe.com/docs/stripe.js

We've been using fake_stripe internally for a while and are excited to share it
with you now. Try it out and report any bugs or send us a pull request on
[GitHub].

[GitHub]: https://github.com/thoughtbot/fake_stripe
