Skip to content

Instantly share code, notes, and snippets.

@briancollins
Created June 18, 2013 15:32
Show Gist options
  • Save briancollins/5806376 to your computer and use it in GitHub Desktop.
Save briancollins/5806376 to your computer and use it in GitHub Desktop.
require 'csv'
require 'stripe'
Stripe.api_key = "YOUR_SECRET_KEY"
CSV.load(File.open("customers.csv"), :headers => true).each do |row|
customer = Stripe::Customer.create(:description => row['description'], :email => row['email'])
puts "Created customer with ID: #{customer.id}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment