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
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, plastic, and donation endpoints use the same auth, request shape, and response conventions. Donations API docs. Full docs →
Charity donations API

Donations for any app. Not just Shopify.

The charity donations API is open to any app. GoodAPI acts as the commercial co-venturer for giving that runs through it.

How the money moves

01 Collect

We collect via Stripe.

02 Grant

Funds go through Our Change Foundation, a 501(c)(3) that grants to nonprofits. We name your platform in the grant info.

03 Payout

We pay out monthly on the 28th. Nonprofit receive timing depends on grantor portal settings. Nonprofits get a dashboard and CA AB 488 reports.

04 Receipt

You get the tax receipt.

Fees

GoodAPI charges no donation processing fees and takes no cut of the donation.

Donation costs are the Lead plan at $49/month for API access, Stripe collection (about 2 to 3 percent for cards, or about 0.8 percent for ACH if set up), and the foundation's 1.9 percent grant fee (to them, not GoodAPI).

Example: collect $100, receipt for $97 after card fees, nonprofit gets $95.10 after the grant fee.

CCV compliance

All 50 states require an agreement between the for-profit and the nonprofit. 39 require that agreement registered, and GoodAPI is registered in all 39. 6 of those also require GoodAPI itself to register: Alabama, California, Hawaii, Massachusetts, Mississippi, and South Carolina. Those filings are done.

Brand Partners, including API platforms, are already covered by GoodAPI's agreement with Our Change Foundation. They do not need to file separately for California or Hawaii. Our registrations cover Brand Partner obligations.

California public CCV profile

Naming a nonprofit

Each API call names a nonprofit by EIN or nonprofit ID from 1.3M+ verified 501(c)(3)s.

Read the charity donations API docs

Required disclosure

Show this copy next to the donation or behind an info icon:

Our donation platform, GoodAPI, partners with Our Change Foundation (EIN: 86-3353394), a nonprofit Section 501(c)(3) organization that makes grants to the nonprofits you suggest here. Learn more about how we process donations

Lead plan for API access

$49/month

GoodAPI charges no donation processing fees and takes no cut of the donation. GoodAPI covers state fees, bonds, and filings.

The only other costs on donations are Stripe collection fees and the 1.9 percent grant fee (to the foundation, not GoodAPI).

No minimum commitment and no cancellation limits.

Go live month to month

Access is month-to-month under the Terms and Conditions. No sales agreement is required unless you have custom requirements. Those go on a custom plan.

Request our compliance pack
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, or planted & verified.
  • ✓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. Lead is $49/month for API donations.

No monthly fee on trees and plastic. No seat-based pricing. No minimum commit. Charity donations API access is $49/month on the Lead plan. GoodAPI charges no donation processing fees and takes no cut of the donation.

$0.43
per tree planted
Mangroves in Kenya & Brazil, verified by Veritree
$0.05
per plastic bottle
Ocean-bound collection, verified by Plastic Bank
$49
Lead plan / month
Charity donations API access for any app
$0
for test mode
Full API surface, no charges, unlimited calls

The only other costs on donations are Stripe collection fees and the 1.9 percent grant fee (to the foundation, not GoodAPI). GoodAPI covers state fees, bonds, and filings. See funds flow, read the donations docs, or see Shopify donations.

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 and no cancellation limits. Trees and plastic have no monthly fee. You pay per API call. Charity donations API access is $49/month on the Lead plan.
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. The charity donations API is open to any app, not just Shopify. Each call names a nonprofit by EIN or nonprofit ID from 1.3M+ verified 501(c)(3)s. Search, subscribe, donate, list, and refund. Charity donations API. Sign up at app.thegoodapi.com to get your API key.
How do donation funds move? +
We collect via Stripe. Funds go through Our Change Foundation, a 501(c)(3) that grants to nonprofits. We name your platform in the grant info. We pay out monthly on the 28th. When the nonprofit receives funds depends on grantor portal settings. Nonprofits get a dashboard and CA AB 488 reports. You get the tax receipt.
What fees apply to donations? +
GoodAPI charges no donation processing fees and takes no cut of the donation. Donation costs are the Lead plan at $49/month for API access, Stripe collection (about 2 to 3 percent for cards, or about 0.8 percent for ACH if set up), and the foundation's 1.9 percent grant fee (to them, not GoodAPI). Example: collect $100, receipt for $97 after card fees, nonprofit gets $95.10 after the grant fee.
Who handles commercial co-venture compliance? +
GoodAPI acts as the commercial co-venturer for giving that runs through it. All 50 states require an agreement between the for-profit and the nonprofit. 39 require that agreement registered, and GoodAPI is registered in all 39. 6 of those also require GoodAPI itself to register: Alabama, California, Hawaii, Massachusetts, Mississippi, and South Carolina. Those filings are done. Brand Partners, including API platforms, are already covered by GoodAPI's agreement with Our Change Foundation. They do not need to file separately for California or Hawaii. Our registrations cover Brand Partner obligations. See our California public profile.
Can I tag donations and filter history? +
Yes. Use attribution plus metadata on each donation, then filter donation history by those fields.
Can we hold funds and release them at a milestone? +
No. Milestone or staged grant release is not supported. You must control timing on your end. Once funds go on the 28th, the foundation is required by law to start granting to the designated nonprofits.
Can we aggregate company-funded gifts into one donation per nonprofit? +
Yes. If the company funds the donation, you may total contributions internally and send one donation per nonprofit periodically. The same compliance rules apply.
Do I need a sales agreement to go live? +
Access is month-to-month under the Terms and Conditions. No sales agreement is required unless you have custom requirements, which go on a custom plan. Request our compliance pack for registrations and filings.
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, rescue a bottle, or record a donation in under five minutes. Production keys go live the same day. Any app can embed donations.

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