Recent developments in “Regenerative Finance” and the blockchain-enabled web have made it possible for anyone to participate directly in the Voluntary Carbon Market. We are proud to offer this simple, easy-to-use checkout and carbon retirement API for the next generation of carbon offsetting.

This plug-and-play API makes it possible to add blockchain-enabled carbon offset retirement to any webapp. You can even use it to build your own carbon offset storefront.

To see it in action, visit our storefront https://offsetra.com/buy/by-the-tonne

<aside> ❗ Please note this API is in beta and we have not yet implemented API versioning— it may be subject to breaking changes in the near future. Contact [email protected] if you have any questions.

</aside>



Quick Start

const params = {
  /** Quantity of carbon you wish to retire (metric tonnes) */
  quantity: "2",
  /** AKA the "carbon pool" from which you wish to retire carbon. */
  retirement_token: "bct", // bct | nct | ubo | nbo | mco2
  /** Name of the retirement beneficiary */
  beneficiary_name: "Jane Doe",
  /** A message to inscribe on the blockchain */
  retirement_message:
    "To compensate for my round-trip flights from New York to Paris.",
  /** The url to return to if the user cancels the transaction */
  cancel_url: "<https://my-carbon-store.earth/canceled?quantity=2>",
  /** Optional EVM-compatible wallet address to attribute this retirement to. */
  beneficiary_address: "0xF63bD932B6307d3Db083631F09C876646cB4E2D2",
  /** Optional 0x address of the specific project you wish to retire. */
  project_address: "0x8a28aed48cbf8d2dad6bb1d173940203d151a1c6",
};

const res = await fetch("<https://checkout.offsetra.com/api/checkout>", {
  body: JSON.stringify(params),
  method: "POST",
  headers: {
    "content-type": "application/json",
  },
});
const { url } = await res.json();
window.location.href = url;

Summary

Currently, this API can be used to accept credit card payments and generate verified and permanent carbon offset retirements for yourself or your users. No crypto experience is required for developers, and customers do not require a crypto wallet.

  1. POST the desired quantity (tonnes), carbon asset, name, message, and desired carbon project to our API.
  2. Our system fetches real-time prices from the Polygon blockchain and returns a payment checkout URL.
  3. After payment is completed, the selected carbon assets are immediately retired. All retirements take place on the sustainable and efficient Polygon blockchain, and are permanent public record. All carbon retirements are final and immutable.
  4. Users are directed to a receipt page, which includes a unique proof-of-retirement page powered by KlimaDAO. They should also receive email confirmation for their purchase.

Documentation

Limitations

See the Quick Start example above for a list of all optional and required parameters. In addition to these, you must observe the following conditions: