Offset your Carbon Emissions

Shipping physical items? Executing transactions on a blockchain? CHANGE makes it simple to offset your carbon consumption. Our carbon APIs work by powering donations to Carbonfund 501(c)(3), a nonprofit that routes 100% of donations to carbon offset projects. Learn more about how they fight climate change on their website.

Get your credentials

The Donations API uses basic authentication. Sign up for a CHANGE account to get access to test credentials. (Don’t worry, you can follow along without credentials too!)

To view your test credentials, click the “View Test Data” button on the left, then go to your Home page. Your sandbox keys have the prefix test, and your production keys have the prefix live.

Calculate your offset

The first step is to calculate how much you need to donate to offset your transaction.

For cryptocurrencies, hit our /donations/crypto_calculate endpoint. Specify the currency (eth and btc are currently supported), and the number of transactions to offset (or leave it blank for only one transaction).

curl https://api.getchange.io/api/v1/climate/crypto_offset
-d 'currency=eth&count=2'

For physical shipments, hit our /donations/carbon_calculate endpoint. Specify the origin and destination zip codes, the weight of the shipment, and the primary transportation method (air, truck, rail, or sea). If you already know the distance, you can use the distance_mi param. See the api documentation for more.

curl https://api.getchange.io/api/v1/climate/shipping_offset
-d 'origin_address=60148&destination_address=94133&weight_lb=3.5&transportation_method=air'

Either way, you’ll get a response that looks like this:

// This is the donation amount (in cents) that will offset your carbon consumption.
"amount": 18,
// This is the id a carbon-offsetting nonprofit (CarbonFund).
"nonprofit_id": "n_l8vRRYrxhw0ei8AMYto5FzU1"

Make a donation

If everything looks good, you can pipe these response values right into a donation!

curl https://api.getchange.io/api/v1/donations
-d 'amount=18&nonprofit_id=n_l8vRRYrxhw0ei8AMYto5FzU1&funding_source=merchant'

Congrats, you just offset your carbon consumption and made the world a better place!

Measure your impact

So you’re improving Earth, but by how much? Qualify your impact with the /donations/carbon_stats endpoint to see the equivalent number of trees planted that your donations are worth. These types of stats are great for sharing with your customers. All statistics are verified by Carbonfund 501(c)(3).

curl https://api.getchange.io/api/v1/climate/stats

Example response:

// Total amount of all your donations to CarbonFund
"amount": 283,
// Equivalent number of trees planted
"trees": 4.6,
// Tonnes of C02 offset
"co2_tonnes_offset": 0.283
Made with ❤ in San Francisco