Skip to content

Instantly share code, notes, and snippets.

@adamjstevenson
Created October 5, 2016 22:34
Show Gist options
  • Save adamjstevenson/e87c245fa3e45925c933f146d3fde315 to your computer and use it in GitHub Desktop.
Save adamjstevenson/e87c245fa3e45925c933f146d3fde315 to your computer and use it in GitHub Desktop.
Simple Declines Report
require 'stripe'
Stripe.api_key = "YOUR-API-KEY"
declines = Stripe::Charge.list(paid: false, limit: 100)
declines.auto_paging_each do |decline|
puts "#{decline.id},#{decline.failure_code},#{decline.failure_message}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment