A text message system for checking one's EBT card balance (SNAP benefits and more)

Subscribe to updates I use balance

Statistics on balance

Number of watchers on Github 37
Number of open issues 85
Average time to close an issue about 1 month
Main language Ruby
Average time to merge a PR 3 days
Open pull requests 8+
Closed pull requests 8+
Last commit over 2 years ago
Repo Created over 4 years ago
Repo Last Updated 11 months ago
Size 357 KB
Organization / Authorcodeforamerica
Page Updated
Do you use balance? Leave a review!
View open issues (85)
View balance activity
View on github
Fresh, new opensource launches πŸš€πŸš€πŸš€
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating balance for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)


Build Status

A text message interface for people to check their EBT card balance for SNAP and other human service benefits

Alt text

Currently available in:

  • California
  • Texas
  • Pennsylvania
  • Alaska
  • Virginia
  • Oklahoma
  • North Carolina

If you want to use Balance with real SNAP recipients, check out the list of official Balance phone numbers.

What it is

This is a simple Ruby app built on Twilio that creates a text message interface for people to check their food stamp EBT card balance (and cash balance for other programs).

The original idea was by @lippytak with influence from @alanjosephwilliams's experience on Code for America's health project ideas repo.

This is a project of CFA's Health Lab Team.


Our primary metrics are:

  • # of successful balance checks (growth)
  • # of unique users with 1+ successful balance checks (growth)
  • % of users who check their balance more than once (engagement)


(click for interactive graph - sorry it's so slow!)


We aren't accepting contributions right now because it takes a lot of work to QA each new state and we don't have it. Sorry about that! If you're really interested and/or work for a gov agency please feel free to get in touch:


To deploy on Heroku, close and push the repo, and then set the following environment variables:


with your Twilio credentials.

Then, go onto your Twilio account and purchase a phone number. Configure that phone number with the following request URLs:

Voice: (choose HTTP POST from dropdown)

Messaging: (choose HTTP POST from dropdown)

Running tests

Because we use .env for testing, you'll want to run your tests by running:

foreman run bundle exec rspec spec

Twilio Console

The twilio_console.rb file just gets you a quick Ruby prompt with Twilio clients pre-loaded. This is useful for doing manual responses to users. To use this, you will need to set the environment variables specified in that file.

Ops Details


We have isolated Twilio subaccounts for the app, under CFA's main account.

  • Staging: balance-health-guarino
  • Production: balance-production-guarino

Each account has phone numbers attached to it.

For A/B testing different outreach media, we can buy a new phone number on the same Twilio subaccount and point it to the same server URL.


We're deployed on Heroku on CFA's main account with both staging and production instances. Currently only @daguar is configured as a collaborator.

Adding new phone numbers

If you add a new phone number, you will need to restart the app to get it working (this is because we pull down the list of phone numbers and their names when the app starts up, so it requires a restart to refresh this list.)

To do this, simply restart production:

heroku restart -a balance-production

Copyright & License

Copyright Code for America Labs, 2014 MIT License

balance open issues Ask a question     (View All Issues)
  • almost 3 years Change "trouble finding card" message to "you've entered a non-working card" message
  • almost 3 years Add support for VA having cash balance
  • almost 3 years Set up better monitoring/reports for unparseable transcriptions
  • almost 3 years Fix regex for "zero dollars" for all states
  • over 3 years Monitor for transcriptions that are stuck "in progress" for more than a few minutes
  • over 3 years Give Balance users help with benefit termination
  • over 3 years H13 error
  • over 3 years Give Texans more context about where the last 3 digits of their card are
  • over 3 years Say "you're welcome!" and other nice things when someone says "thank you"
  • over 3 years Failed transcription with 8-minute lag on callback from API
  • over 3 years Fix occasional problem where recording+callback doesn't happen because of silence
  • over 3 years Document related code outside this repo in the README
  • over 3 years Metrics down (mo data, mo problems)
  • over 3 years Remove note on checking call-to-inbound-text from
  • over 3 years Investigate/figure out path for demo instance's unexpected high usage
  • over 3 years An easy way to turn on an auto-responder (directing users to call phone # instead)
  • almost 4 years Set Papertrail to not send out alerts for R12 (timeout) errors
  • almost 4 years Will JPMorgan leaving EBT impact AK and PA Balance
  • almost 4 years Switch web server to Puma
  • almost 4 years Fix "senseless cents" issue in California transcription
  • almost 4 years Gracefully handle invalid 'From' phone numbers in Twilio
  • almost 4 years Verify all requests come from Twilio
  • almost 4 years [stub] Change AK's balnce message from food stamp to SNAP or Quest
  • about 4 years Reconsider UX around incoming phone calls
  • about 4 years [stub] Research transcription accuracy for homonyms
  • about 4 years [stub] Update 'state expansion' instructions based on transcription review
  • about 4 years [stub] Fix SNAP/cash balance order for NC
  • about 4 years [stub] Fix SNAP/cash balance order for MO
  • about 4 years [stub] Add Cash balance amount to TX
  • about 4 years Make recording length state-specific (and increase maxLength for MO)
balance open pull requests (View All Pulls)
  • Add North Carolina to
  • Using standard Ruby `i18n` library
  • Add Yupik and Russian language support
  • Adds a civic.json file
  • Add ky
  • Add support for Massachusetts (do not merge β€”Β needs rewrite)
  • Add support for Illinois (do not merge β€”Β needs rewrite)
  • Florida implementation
balance questions on Stackoverflow (View All Questions)
  • Improving balance in flexbox lines
  • Balance API in C++ to connect with Django web-server?
  • haproxy balance uri depth
  • Wrong balance between Aerospike instances in cluster
  • Automatically Send Wallet Balance to Another Wallet
  • Calculating Average daily Balance in SQL
  • Update balance of all users with php and mysql
  • Immutable vs javascript arrays, objects - what's the right balance?
  • receive data via Bluetooth from one balance to an app phonegap?
  • Replacing Apache Camel with F5 to balance load on 4 web servers
  • Apache load balance tomcat websocket
  • Not able to Load Balance request over haproxy
  • Dynamics AX 2012 Query Customer Credit Balance On SQL Server
  • Normalizing tables for payment on delivery of a single monthly invoice with entire balance due
  • How to calculate running total balance in SQL
  • Sklearn : How to balance classification using DecisionTreeClassifier?
  • Calculate daily balance with Elasticsearch/Kibana
  • Recursive function for foobar challenge Peculiar Balance
  • Bracket Balance - checking if there are more right brackets or left brackets (Python)
  • SQL Account Balance Table
  • Robocopy script to load balance over 2 destinations
  • How to load balance wso2 1.9.0 with NGINX 1.6.2
  • Understanding DNG white balance system
  • Spring Integration - Load Balance across multiple TCP outbound gateways
  • Elastic Load Balance Config for Node.js and AWS EB
  • How do you effectively color balance an image using Core Image filters?
  • Database design: Calculating the Account Balance
  • print out balance sheet after getting data from different database table
  • DynamoDB atomic counter for account balance
  • balance illuminance of images stitching Matlab
balance list of languages used
Other projects in Ruby