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.
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"}
}' {
"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" 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.
One pattern. Every impact type.
Trees and plastic share one request shape. Donations add search, subscribe, and donate. Same auth, same base URL.
/plant/trees Plant trees. Returns confirmed registration with ID, count, and running totals.
/plant/trees List plantings. Filter by attribution, date range, metadata, or registration ID.
/refund/trees Refund a registration (full or partial). Adjusts billing automatically.
/rescue/plastic_bottles Rescue ocean-bound plastic bottles. Same request shape as /plant/trees.
/rescue/plastic_bottles List bottle rescues. Same filters as tree listings.
/refund/plastic_bottles Refund a bottle rescue (full or partial). Adjusts billing automatically.
/charities/search Search 1.3M verified 501(c)(3)s by name or EIN.
/charities/subscribe Subscribe a store or account to selected charities.
/charities/donate Record a donation against subscribed charities.
/charities/donations List donation history. Filter like other GET endpoints.
/refund/donations Refund a donation (full or partial).
/evidence Aggregated verification data: GPS regions, countries, photo/video evidence, carbon stats.
/evidence/tree/{id} Full tree lifecycle timeline: registration, funds, allocation, planting, with GPS, crew, and photo proof.
/dashboard_url Get your public impact dashboard URL. Embed it or link to it from your app.
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
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. Nonprofit receive timing depends on grantor portal settings. Nonprofits get a dashboard and CA AB 488 reports.
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.
Naming a nonprofit
Each API call names a nonprofit by EIN or nonprofit ID from 1.3M+ verified 501(c)(3)s.
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.
What developers build with it.
Checkout flows
Plant trees, rescue plastic, or record a donation on every order. One POST per transaction.
Employee milestones
Plant a tree for every performance review, work anniversary, or promotion.
Impact dashboards
Pull planting totals and evidence data into your own UI. White-label it all.
In-game events
Plant real trees during seasonal events. Give players tangible impact.
Onboarding gifts
Welcome every new user with a planted tree. Memorable and zero logistics.
Checkout flows
Plant trees, rescue plastic, or record a donation on every order. One POST per transaction.
Employee milestones
Plant a tree for every performance review, work anniversary, or promotion.
Impact dashboards
Pull planting totals and evidence data into your own UI. White-label it all.
In-game events
Plant real trees during seasonal events. Give players tangible impact.
Onboarding gifts
Welcome every new user with a planted tree. Memorable and zero logistics.
Loyalty programs
Let customers redeem points for trees, ocean cleanup, or a donation.
Event registrations
Plant a tree for every conference attendee or webinar signup.
Newsletter signups
Plant a tree for every new subscriber. Show the running total in your emails.
Community milestones
Plant a tree every 250 messages, 1,000 posts, or hit a custom goal.
Brand campaigns
"We plant a tree for every signup this week." Or fund a charity. One endpoint.
Loyalty programs
Let customers redeem points for trees, ocean cleanup, or a donation.
Event registrations
Plant a tree for every conference attendee or webinar signup.
Newsletter signups
Plant a tree for every new subscriber. Show the running total in your emails.
Community milestones
Plant a tree every 250 messages, 1,000 posts, or hit a custom goal.
Brand campaigns
"We plant a tree for every signup this week." Or fund a charity. One endpoint.
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.
- ✓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.
- ✓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.
- ✓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.
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.
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.
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.
Common questions.
Is there a minimum volume or commitment? +
How fast is the API? +
What authentication does it use? +
Do you support idempotency? +
Can I attach metadata to each action? +
What about refunds? +
Can I track individual tree lifecycle? +
Can I donate to a charity from the API? +
How do donation funds move? +
What fees apply to donations? +
Who handles commercial co-venture compliance? +
Can I tag donations and filter history? +
Can we hold funds and release them at a milestone? +
Can we aggregate company-funded gifts into one donation per nonprofit? +
Do I need a sales agreement to go live? +
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