Green banking

The Lune Fils and our approach

Fils provides a single API for use in-app and web channels
to fetch, mutate, and deliver the data necessary to offset
CO emissions across a range of verticals. 

Our API-first approach allows our customers to embed carbon offsetting and emission calculations into logistics,
payments, and fintech platforms to deliver a unique and programmatically driven experience that brings climate
into our clients’ products.

Overview

In this guide, you will learn how to interact with the Fils
API to:

Calculate emissions for financial transactions Offset those emissions.

Who is this guide for?

This guide is primarily aimed at Product Managers and developers looking to integrate CO emissions estimations and offsetting into an existing end-user experience. 

Feel free to contact our support team if you encounter any
issues integrating our logistics use case.

Concepts

Client account – You can optionally create a client account for each of your clients to define their basic characteristics, such as name, currency, and beneficiary. Clients will be provided a Lune defaults. 

Fils defaults – Lune has provided a default Project bundle for each of our clients. Every order will be placed against the following projects and ratios

API flow

Getting an API key

First, head over to the Lune dashboard and generate a new API key.
  • Navigate to https://dashboard.fils.co/developers
  • Select New Test API Key, enter a value in the Name field, and select an account from Default account
  • Select Save
  • Copy your API key, as you’ll need it to interact with the Lune AP

Create a client account

A client account is required for each of your clients and defines their basic characteristics, for example, the currency used to display emission offsetting prices.

Client accounts are optional but recommended for B2B businesses and discouraged for B2C businesses. Learn about their benefits and how to use either

Sample request

You can optionally pass in beneficiary to link a client account to the legal entity receiving the carbon offset

Sample response

A successful request will return a unique id, which you will
need to pass in later interactions with the Lune API.

Where:

  • id is the unique identifier for each of your clients, which you must map in your code base
  • name is a name that you will use to identify your client and present offsetting options to
  • currency defines the currency used to display the price for each offsetting option
  • type defines the type of account. Use test for your playground
  • beneficiary is the legal entity shown on the Carbon Offset Certificate and carbon registries
Following a successful response, a client account will be added to your dashboard:

Calculate emissions for transactions

To calculate an estimate of CO₂ emissions for up to 100 transactions, pass in the transaction amount, the MCC (Merchant Category Code), and Merchant country for each transaction

Sample request

Where:

  • $CLIENT_ACCOUNT_ID is the unique identifier for the client
  • value.value defines the shipment load; in this example, 40 tonnes
  • value.currency is the currency in which the transaction was completed
  • merchant.category_code is the Merchant Category Code (MCC) used to classify the type of goods and services that are transacted
  • merchant.name is the name of merchant in the transaction
  • merchant.country_code is the 3-character (ISO 3166) country code for the country in which the transaction was completed

Sample response

A successful 200 response will result in an estimate of CO₂ emissions for each transaction, which can be presented in-app.

Where:

  • mass.amount is the calculated amount of CO₂ emissions for the transaction
  • mass.unit is the mass unit
  • quote.bundles is a container object for the Project bundles that will be used to offset the emissions associated with the transaction and includes the bundle id, bundle name, and unit price
  • quote.estimated_total_cost is the total cost of offsetting the CO₂ emissions for that transaction in the client’s currency

Offset emissions

To offset emissions, pass in the calculated sum of emissions.

Sample request

Where:

  • mass.amount is the total amount of CO₂ in tonnes to offset
  • mass.unit is the mass unit

Sample response

Where:

  • id is the unique identifier for the booking
  • idempotency_key is a unique token that you submit as a request header, that guarantees that only one order will be created regardless of how many times a request is sent to us
  • status is the order status. placed means the order has been validated, accepted and will be fulfilled
  • offset_cost is the cost of purchasing the offsets
  • total_cost is the total cost of purchasing the offsets, including Lune’s fee
  • commission is Lune’s fee
  • quantity is the total quantity of offsets purchased, expressed in tonnes
  • bundles.bundle_id are the Lune default project bundles against which CO₂ emissions will be offset

Leave a Reply

Your email address will not be published. Required fields are marked *