offset-orders | Wren API

Offset Orders

An Offset Order represents an order placed on Wren to remove a certain amount of carbon dioxide (or CO₂ equivalents) from the atmosphere using projects in a Portfolio. When you create an offset order, our system records the amount of CO₂ removed and pays the respective project partners for carbon credits at the end of each month.

POST /api/offset-orders — Create offset orders

Creates offset orders by allocating a given number of tons across the projects in a portfolio. Funds are distributed according to the portfolio's allocation percentages.

POST/api/offset-ordersCopy Path

Authentication

Required. Use a team API token (recommended) or legacy personal API token via Basic auth or Bearer token. Account (password, Google, or Shopify) required for personal tokens. Test tokens (wren_test_…) return canned responses without DB writes, Stripe charges, or notifications — full validation still runs. See Test mode.

Headers

Request body

Attribute Type Description & Constraints
tons number Required. Amount of CO₂e to offset in tonnes.
portfolioId number Optional. Portfolio ID for allocation. Default: Wren Climate Fund.
note string Optional. Note attached to each order.
dryRun boolean Optional. If true, no charge is made; returns preview only.
sendReceiptEmail boolean Optional. If true, sends a receipt email when dryRun is false.
paymentMethod string Optional. "stripe" (default) or "credits". When "credits", deducts from your credit balance instead of charging Stripe. No $1 minimum when using credits.
onBehalfOfName string Optional. Name of the end-customer this order is being placed for. Shown as the purchaser on the impact certificate. Max 200 characters.
onBehalfOfEmail string Optional. Email of the end-customer this order is being placed for. Stored alongside the order; not used for sending email. Max 320 characters.

Minimum amount

Example request

Success response

HTTP 200

When paymentMethod is "credits", the response also includes:

Error responses


GET /api/offset-orders — List your offset orders

Returns the authenticated user's offset orders with aggregate stats.

GET/api/offset-ordersCopy Path

Authentication

Required. Use a team API token or legacy personal API token via Basic auth or Bearer token. Test tokens return a small canned sample list.

Request

No body. No query parameters.

Success response

HTTP 200

Error responses


GET /api/offset-orders/public — List public offset orders

Returns a curated list of public offset orders for display (e.g. leaderboards, feeds). No authentication required. Data is cached and refreshed hourly.

GET/api/offset-orders/publicCopy Path

Authentication

None required.

Request

No body. No query parameters.

Success response

HTTP 200