Retire Carbon
Initiate carbon retirements via a REST endpoint
The Retirement API is currently in beta. The endpoints and parameters are in active development and are likely to change.
In the code examples below we use api.carbonmark.com as the base URL, however, when consuming our API, be sure to prefix the API URL with a version number. For example, the base URL of version 1 would be v1.api.carbonmark.com
.
Any changes that we make to an API version are guaranteed to be backwards compatible. However, if you omit the version prefix (api.carbonmark.com
) your application will be exposed to breaking changes because api.carbonmark.com is always routed to the latest major version.
Carbonmark's Retirement API offers developers a path to initiate carbon retirements via a REST endpoint. Follow the guide below to get started:
In this guide, you will learn to:
Get access to the Carbonmark developer dashboard and get your API Key
Find a project or index product to retire
Identify the listing details
Create a quote
Create an order
Confirm carbon credit retirement
What is the difference between retiring carbon from a seller listing and retiring carbon from a pool?
Listings can be from an individual or organization seller (i.e. Seller Listing) or from a Carbon Pool. A project may therefore have multiple listings at different price points.
Seller listing prices are controlled by the seller. Carbon Pool pricing is dynamic and can incur slippage.
Retire Carbon Steps
1. Get authenticated
Request access to the developer dashboard to generate your API Key before proceeding.
Once the API services agreement is signed and access is confirmed by email from our onboarding team, you can create API keys from our Developer Dashboard
. Click Don't have an account? Sign up
to create an account using the whitelisted email address provided.
The API Key is sensitive and can be used to create costly retirements on your behalf.
Be careful not to expose the API Key or commit it to your repository.
Note that you can create a sandbox key
for testing purposes.
Keys are generated once and not exposed in the Developer Dashboard so you must copy them to be utilized.
2. Find a project or index product to retire
Use the carbonmark.com
marketplace or api.carbonmark.com/carbonProjects
to identify a project or api.carbonmark.com/products
to identify an index product you’d like to retire. The Retirement API is compatible with any credit that has a visible price.
The /carbonProjects
endpoint allows you to retrieve an array of carbon projects filtered by desired query parameters and returns project metadata and prices. Make note of the "key
" (for example, VCS-191) of the project you are interested in.
The /products
endpoint allows you to retrieve an array of carbon index products filtered by desired query parameters and returns products metadata and prices. Make note of the "id
" (for example, mco2) of the product you are interested in.
You can also check out our various guides to discovering carbon projects or index products via our REST API.
3. Identify the listing details
Listing details for a project or product can be returned for an array of ID's and other query parameters. For example, api.carbonmark.com/prices?projectsIds={project key}&projectsIds={project key}
. Or api.carbonmark.com/prices?productIds={productID}
. See /prices
endpoint for details.
Note that a /prices
response may include type "listing" (i.e. seller listing) or "carbon_pool" or "product" depending on the query parameters used.
Project JSON example
Product JSON example
4. Create a retirement quote
The next step is to create a "Quote" for the listing you are interested in using the /quotes
endpoint .
A header is required to provide the Authorization
bearer token. The required parameters for a quote are asset_price_source_id
and quantity_tonnes
.
This is a response example, note the uuid
which will be required to generate an order.
5. Create a retirement order
The next step is to create an "Order" for the quote generated above using the /orders
endpoint .
A header is required to provide the Authorization
bearer token. The required parameters for an order request are quote_uuid
(from the /quote response), beneficiary_name
, and retirement message
.
Note that some registries have specific requirements. For example, creating an order for a Puro.earth registry credit requires consumption_metadata
to be submitted in the request.
This is a response example.
You should receive a response containing your order details including order status
of your order which will allow you to confirm your order has been SUBMITTED
and will be completed shortly.
The actual retirement transaction will be initiated instantly by our system, and broadcast to a blockchain network so the underlying credit is permanently retired and taken out of circulation.
It typically takes between 0.5 and 3 seconds for the retirement to be complete — this includes order creation, transaction broadcast, confirmation on the blockchain, and final retirement certificate generation.
5. Confirm your order is complete and view your retirement receipt
To verify your order has been completed, send a request to https://api.carbonmark.com/orders?quote_uuid=uuid
.
Once your order status
is COMPLETED
, your order is complete and the carbon credit has been retired.
You can follow the polygonscan_url
or view_retirement_url
URLs in the response for further confirmation that your retirement order transaction is complete.
Alternatively, you can navigate back to the Carbonmark Developer Dashboard and see the entry and the order status.
View retirement receipt
When the transaction is finalized and our system has marked the order status as “complete”, the provided URL should take you to the shareable retirement receipt.
https://app.carbonmark.com/retirements/{beneficiaryAddress}/{number}
For example: https://app.carbonmark.com/retirements/0xab5b7b5849784279280188b556af3c179f31dc5b/33
The order will appear in your developer dashboard as well.
The cost of the order will be added to your monthly invoice.
Want to learn more?
One of our solution specialists would be happy to answer any questions you have.
Last updated