A Ruby client library for the Tremendous API.

[!NOTE] This branch includes the v5 version of the Tremendous Ruby client, a new version based on our API schema docs. If you are using the v4 versions, please check our UPGRADING guide


$ gem install tremendous_ruby
# or add it to your Gemfile
$ bundle add tremendous_ruby

Getting started

All API requests require an access token. A sandbox access token is assigned upon signup through the Tremendous Sandbox Environment. Once you are ready to move to production, you will be assigned a production access token.


Using a global config & client instances:

Tremendous::Configuration.default.configure do |config|
  # you can use `Tremendous::Configuration::Environment["production"]` when
  # ready to use our production environment.
  config.server_index = Tremendous::Configuration::Environment["testflight"]

  config.access_token = "YOUR-ACCESS-TOKEN"

client =

Building your own:

config = do |config|
# ...

api =

client =


Submitting an order:

order_data = {
  payment: {
    funding_source_id: "balance",
  reward: {
    value: {
      denomination: 20,
      currency_code: 'USD'
    campaign_id: "CAMPAIGN_ID",
    delivery: {
      method: 'EMAIL',
    recipient: {
      email: '[email protected]',
      name: 'Sarah Smith'

response = client.create_order(order_data)
puts "Order created! ID: #{}"

Retrieving an Order and a Reward

order = client.get_order("[ORDER_ID]").order
reward = client.get_reward("[REWARD_ID]").reward

puts "The order status is #{order.status}"
puts "The reward was delivered to #{}"

Listing products:

products = api_client.list_products.products

products.each { |product| puts }

Listing funding sources:

funding_sources = client.funding_sources.list

funding_sources.each do |funding_source|
  puts "* #{funding_source.method} => #{}"