API REST + JSON · Test mode included

Take Action With Every Transaction

The impact API for trees, plastic removal, and donations. One POST per event. Verified data in the response. Ship in an afternoon.

$0.43 per tree $0.05 per bottle Test mode free
curl: Plant 3 trees
Request
curl -X POST https://app.thegoodapi.com/plant/trees \
  -H "Authorization: test_sk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "count": 3,
    "attribution": "order_8294",
    "metadata": {"customer": "cus_k29f"}
  }'
Response
200 OK
{
  "total_planted_trees": 4847,
  "total_planted_trees_month": 312,
  "tree_details": [{
    "id": "tr_8f3k2m9x",
    "count": 3,
    "created_at": "2026-05-19T14:32:07Z",
    "attribution": "order_8294",
    "metadata": {"customer": "cus_k29f"},
    "refunded": false
  }]
}
// Plant trees on every order
const response = await fetch("https://app.thegoodapi.com/plant/trees", {
  method: "POST",
  headers: {
    "Authorization": process.env.GOODAPI_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    count: 3,
    attribution: order.id,
    metadata: { customer: order.customer_id },
    idempotency_key: `trees_${order.id}`,
  }),
});

const { tree_details } = await response.json();
console.log(tree_details[0].id); // "tr_8f3k2m9x"
Why GoodAPI

Developer-first by design.

No SDKs to install, no webhooks to configure, no dashboard you have to click through. One endpoint, one response, verified impact.

REST + JSON

Standard HTTP. No proprietary SDK, no GraphQL, no SOAP. POST JSON, get JSON back. Works with any language, any framework.

Synchronous response

Planting confirmation in the response body. No polling, no async callbacks. Your checkout flow doesn't wait on a webhook.

Idempotent by design

Pass an idempotency_key on any POST. Retries are safe. Duplicate calls return the original response without double-billing.

Test mode

Separate test and production keys. Test calls are free, hit the real API surface, and never generate charges. Ship with confidence.

Verification in the payload

Every response includes a registration ID, timestamp, and running totals. The /evidence endpoint returns GPS coordinates, project regions, and photo/video proof.

Refunds built in

Customer refund? POST /refund/trees or /refund/plastic_bottles with the registration ID. Supports partial refunds. Billing adjusts automatically.

API Surface

One pattern. Every impact type.

Trees and plastic share one request shape. Donations add search, subscribe, and donate. Same auth, same base URL.

Base URL: https://app.thegoodapi.com
Trees
POST
/plant/trees

Plant trees. Returns confirmed registration with ID, count, and running totals.

GET
/plant/trees

List plantings. Filter by attribution, date range, metadata, or registration ID.

POST
/refund/trees

Refund a registration (full or partial). Adjusts billing automatically.

Plastic
POST
/rescue/plastic_bottles

Rescue ocean-bound plastic bottles. Same request shape as /plant/trees.

GET
/rescue/plastic_bottles

List bottle rescues. Same filters as tree listings.

POST
/refund/plastic_bottles

Refund a bottle rescue (full or partial). Adjusts billing automatically.

Donations · Early access
GET
/charities/search

Search 1.3M verified 501(c)(3)s by name or EIN.

POST
/charities/subscribe

Subscribe a store or account to selected charities.

POST
/charities/donate

Record a donation against subscribed charities.

GET
/charities/donations

List donation history. Filter like other GET endpoints.

POST
/refund/donations

Refund a donation (full or partial).

Evidence & Dashboard
GET
/evidence

Aggregated verification data: GPS regions, countries, photo/video evidence, carbon stats.

GET
/evidence/tree/{id}

Full tree lifecycle timeline: registration, funds, allocation, planting, with GPS, crew, and photo proof.

GET
/dashboard_url

Get your public impact dashboard URL. Embed it or link to it from your app.

All tree and plastic endpoints use the same auth, request shape, and response conventions. Donations API docs (early access). Full docs →
Use Cases

What developers build with it.

Verification

What comes back in the API.

GoodAPI partners with Veritree for tree planting and Plastic Bank for ocean plastic. Donations return a registration ID and charity metadata. Here is what you can surface from API data alone.

From every POST
  • Registration ID: unique, permanent reference for the impact event.
  • Count: exact trees planted or bottles rescued, with fractional support.
  • Timestamp: RFC 3339, so you know exactly when it was recorded.
  • Running totals: lifetime and current-month counts for your org.
  • Your metadata: attribution and custom fields echoed back for reconciliation.
From GET /evidence/tree/{id}
  • Lifecycle status: registered, funds distributed, allocated, or planted.
  • Partner order ID: Veritree invoice reference for audit trails.
  • Planting site: GPS coordinates, site name, and local partner org.
  • Crew details: team leader, planting method, team size, women members.
  • Field media: geotagged photos and videos from the actual planting event.
From GET /evidence
  • GPS-tagged regions: named planting sites with country and project data.
  • Photo & video evidence: URLs to verification media from planting sessions.
  • Carbon offset estimate: total CO₂ tonnes sequestered across your plantings.
  • Area restored: hectares of habitat restored, aggregated across projects.
  • Public dashboard: embeddable URL from /dashboard_url for customer-facing proof.
Pricing

Pay per impact. Nothing else.

No monthly fee on trees and plastic. No seat-based pricing. No minimum commit. You pay for the impact you create.

$0.43
per tree planted
Mangroves in Kenya & Brazil, verified by Veritree
$0.05
per plastic bottle
Ocean-bound collection, verified by Plastic Bank
$0
for test mode
Full API surface, no charges, unlimited calls

Charity donations API is early access. Read the donations docs or see Shopify donations pricing.

How billing works: Every POST /plant/trees and POST /rescue/plastic_bottles is metered as usage and reported to Stripe asynchronously. You're billed monthly. Refunds within the current billing cycle adjust your invoice automatically. Need volume pricing? Email saif@thegoodapi.com.
FAQ

Common questions.

Is there a minimum volume or commitment? +
No. Plant one tree, rescue one bottle, or scale to millions. No minimums, no contracts. Trees and plastic have no monthly fee. You pay per API call.
How fast is the API? +
Synchronous. You get a confirmed registration in the response body, typically under 300ms. No polling, no callbacks required. Works the same for trees and plastic bottles.
What authentication does it use? +
API key in the Authorization header. You get a test key and a production key. Test keys never generate charges.
Do you support idempotency? +
Yes. Pass an idempotency_key on any POST. Duplicate keys return the original response without re-billing.
Can I attach metadata to each action? +
Yes. Both an attribution string (for grouping by order, campaign, etc.) and a freeform metadata object are supported on every request. Both are filterable on GET.
What about refunds? +
POST /refund/trees or /refund/plastic_bottles with the registration ID. Supports full and partial refunds within the current billing cycle.
Can I track individual tree lifecycle? +
Yes. GET /evidence/tree/{id} returns a full timeline from registration through funds distribution, site allocation, and verified planting, with GPS coordinates, crew data, and photo/video proof at each stage.
Can I donate to a charity from the API? +
Yes, in early access. Search charities, subscribe, donate, list, and refund. Charity donations API. Email saif@thegoodapi.com to get enabled.
Migrating from Cloverly? Same integration patterns, verified trees instead of offsets, plus plastic and donations. Most developers finish in under a day. Read the migration guide →

Get your API key.

Sign up, grab your test key, and plant a tree or rescue a bottle in under five minutes. Production keys go live the same day. Donations API is early access.

$0.43 per tree · $0.05 per bottle · No monthly fee on trees and plastic · Test mode included