Developer API8 min readUpdated February 2026

Carbon Offset API: Programmatic Carbon Credit Purchase & Retirement

Integrate carbon offsetting directly into your product, checkout flow, or operations. Our RESTful API lets you purchase verified carbon credits, automate retirement, and provide instant carbon neutrality to your customers.

<200ms

Average API response time

99.9%

Uptime SLA

50+

Verified offset projects

What is the Carbon Offset API?

The ZeroCarbon Offset API is a RESTful interface that allows developers to integrate carbon credit purchasing and retirement directly into applications, e-commerce platforms, and business operations. Offer carbon-neutral options at checkout, offset shipments automatically, or neutralize your infrastructure's footprint—all through simple API calls.

Use Cases

  • ✓ Carbon-neutral checkout for e-commerce
  • ✓ Offset shipping and logistics emissions
  • ✓ Employee carbon benefit programs
  • ✓ Event and travel carbon compensation
  • ✓ API-first climate fintech products

Verified Credits Only

  • ✓ Gold Standard certified projects
  • ✓ Verra VCS verified carbon units
  • ✓ Puro.earth CO₂ removal certificates
  • ✓ Real-time retirement certificates
  • ✓ Full supply chain transparency

Authentication

All API requests require authentication using API keys:

Authorization: Bearer zc_live_sk_1234567890abcdef

⚠️ Security: Never expose your secret key in client-side code. Use server-side requests only. For browser/mobile apps, proxy requests through your backend.

Core API Endpoints

GET
/v1/offset/projects

Retrieve available carbon offset projects with pricing and impact details.

View Example Response
{
  "projects": [
    {
      "id": "proj_reforestation_brazil_001",
      "name": "Amazon Reforestation Project",
      "type": "forestry",
      "location": "Brazil",
      "registry": "Verra VCS",
      "price_per_tonne": 12.50,
      "available_tonnes": 50000,
      "co_benefits": ["biodiversity", "community_jobs"],
      "verification_standard": "VCS"
    },
    {
      "id": "proj_renewable_wind_india_003",
      "name": "Rajasthan Wind Farm",
      "type": "renewable_energy",
      "location": "India",
      "registry": "Gold Standard",
      "price_per_tonne": 8.75,
      "available_tonnes": 100000,
      "co_benefits": ["clean_energy", "local_employment"],
      "verification_standard": "Gold Standard"
    }
  ]
}
POST
/v1/offset/purchase

Purchase carbon credits for a specific project and quantity.

View Request Example
POST /v1/offset/purchase
Authorization: Bearer zc_live_sk_...

{
  "project_id": "proj_renewable_wind_india_003",
  "tonnes_co2e": 5.2,
  "metadata": {
    "order_id": "ord_12345",
    "customer_email": "user@example.com"
  },
  "retire_immediately": true,
  "certificate_recipient": {
    "name": "Acme Corp",
    "email": "certificates@acme.com"
  }
}

// Response:
{
  "purchase_id": "purch_xyz789",
  "status": "completed",
  "tonnes_co2e": 5.2,
  "total_cost_usd": 45.50,
  "retirement_certificate_url": "https://certificates.zerocarbon.org.in/xyz789.pdf",
  "created_at": "2026-02-09T12:34:56Z"
}
POST
/v1/offset/retire

Retire previously purchased credits (if not retired on purchase).

View Example
POST /v1/offset/retire
{
  "purchase_id": "purch_abc123",
  "reason": "Offsetting Q1 2026 cloud infrastructure emissions"
}

// Response:
{
  "retirement_id": "ret_def456",
  "purchase_id": "purch_abc123",
  "tonnes_co2e": 10.0,
  "retirement_certificate": "https://certificates.zerocarbon.org.in/def456.pdf",
  "retired_at": "2026-02-09T15:22:10Z"
}
GET
/v1/offset/portfolio

View your carbon offset portfolio and retirement history.

View Response
{
  "total_tonnes_offset": 1250.5,
  "total_spent_usd": 10850.25,
  "projects_supported": 8,
  "retirements": [
    {
      "retirement_id": "ret_001",
      "tonnes_co2e": 50.0,
      "project_name": "Amazon Reforestation",
      "retired_at": "2026-01-15T10:00:00Z",
      "certificate_url": "https://..."
    }
  ]
}

Code Examples

Python

import requests

# Initialize
api_key = "zc_live_sk_..."
base_url = "https://api.zerocarbon.org.in/v1"
headers = {"Authorization": f"Bearer {api_key}"}

# Purchase and retire carbon credits
response = requests.post(
    f"{base_url}/offset/purchase",
    headers=headers,
    json={
        "project_id": "proj_renewable_wind_india_003",
        "tonnes_co2e": 2.5,
        "retire_immediately": True,
        "certificate_recipient": {
            "name": "My Company",
            "email": "carbon@mycompany.com"
        }
    }
)

result = response.json()
print(f"Offset Complete! Certificate: {result['retirement_certificate_url']}")

Node.js / TypeScript

import axios from 'axios';

const apiKey = 'zc_live_sk_...';
const baseURL = 'https://api.zerocarbon.org.in/v1';

// Purchase credits
const purchaseCredits = async (tonnes: number) => {
  const response = await axios.post(
    `${baseURL}/offset/purchase`,
    {
      project_id: 'proj_reforestation_brazil_001',
      tonnes_co2e: tonnes,
      retire_immediately: true,
      metadata: {
        order_id: 'order_12345',
        customer_id: 'cust_abc'
      }
    },
    {
      headers: { Authorization: `Bearer ${apiKey}` }
    }
  );
  
  return response.data;
};

// Usage
const result = await purchaseCredits(10.0);
console.log('Retirement Certificate:', result.retirement_certificate_url);

cURL

curl -X POST https://api.zerocarbon.org.in/v1/offset/purchase \
  -H "Authorization: Bearer zc_live_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "proj_renewable_wind_india_003",
    "tonnes_co2e": 5.0,
    "retire_immediately": true,
    "certificate_recipient": {
      "name": "Acme Corp",
      "email": "carbon@acme.com"
    }
  }'

Webhooks

Receive real-time notifications when offset purchases complete, credits are retired, or certificates are issued.

Available Webhook Events

offset.purchase.completed

Triggered when credit purchase is confirmed

offset.retirement.completed

Triggered when credits are retired

offset.certificate.issued

Triggered when retirement certificate is generated

Example webhook payload:

{
  "event": "offset.retirement.completed",
  "data": {
    "retirement_id": "ret_xyz789",
    "purchase_id": "purch_abc123",
    "tonnes_co2e": 5.2,
    "project_name": "Amazon Reforestation Project",
    "certificate_url": "https://certificates.zerocarbon.org.in/xyz789.pdf",
    "retired_at": "2026-02-09T12:34:56Z"
  },
  "timestamp": "2026-02-09T12:34:57Z"
}

Official SDKs

Python SDK

pip install zerocarbon-python
View Python Documentation →

Node.js SDK

npm install @zerocarbon/node
View Node.js Documentation →

Pricing

$0

API usage fees

$8-15

per tonne CO₂e (project dependent)

No minimum

Purchase from 0.1 tonne

What's Included:

Unlimited API requests
Real-time retirement certificates
Webhook notifications
Portfolio analytics dashboard
Priority support
Custom branding options

Start Building with Carbon Offset API

Get your API keys instantly and start offsetting carbon in production today. Test mode available with sandbox credits for development.

Frequently Asked Questions

How are carbon credit prices determined?

Prices vary by project type, location, co-benefits, and market demand. Forestry projects typically cost $10-15/tonne, while renewable energy projects cost $7-12/tonne. Direct air capture and engineered removal solutions are premium ($150-300/tonne). All credits include registry fees and retirement costs.

Can I white-label the offset experience?

Yes! Enterprise plans include custom branding for retirement certificates, email notifications, and hosted portfolio pages. You can fully integrate offsetting under your brand while we handle registry compliance and credit procurement behind the scenes.

What happens if a project I purchased from fails?

All credits are retired before delivery to you, ensuring permanence. We monitor project health continuously and only source from verified registries with buffer pools. In the rare case of project reversal (e.g., forest fire), registries cancel an equivalent amount from their buffer reserves to maintain integrity.

Is there a test environment?

Yes! Use test API keys (starting with `zc_test_sk_...`) to make unlimited sandbox purchases without charges. Test mode mirrors production behavior including webhooks and certificate generation, but credits aren't actually retired. Perfect for integration development and testing.

Do you support bulk orders?

Yes! For orders above 1,000 tonnes, contact our team for OTC (over-the-counter) pricing and custom project sourcing. We can also establish forward contracts to lock in pricing for predictable offset budgets. API remains the same—we just provision credits in advance.

Published by ZeroCarbon Team

Last updated: February 9, 2026

Carbon Offset API: Purchase & Retire Credits Programmatically | ZeroCarbon | ZeroCarbon