tree-orders | Wren API

Tree Orders

A Tree Order funds tree-planting projects by number of trees rather than dollar amount or tons of CO2. Tree orders are currently fulfilled through the WeForest provider.

POST /api/tree-orders — Create a tree order

Creates a tree order, charging via Stripe or credits.

POST/api/tree-ordersCopy Path

Authentication

Required. Use a team API token (recommended) or legacy personal API token via Basic auth or Bearer token. Account required for personal tokens. Test tokens (wren_test_…) return canned responses without side effects — see Test mode.

Headers

Request body

Attribute Type Description & Constraints
amountOfTrees integer Required. Number of trees to plant. Must be a positive integer.
paymentMethod string Optional. "stripe" (default) or "credits". When "credits", deducts from your credit balance instead of charging Stripe.
note string Optional. Note for the order.
dryRun boolean Optional. If true, no charge; returns preview only.
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.

Example request

Success response

HTTP 200

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

Error responses


POST /api/tree-orders/preview — Preview tree order pricing

Returns pricing information for a tree order without placing it.

POST/api/tree-orders/previewCopy Path

Authentication

Required. Use a team API token or legacy personal API token. Test tokens return a canned preview without DB lookups.

Headers

Request body

Attribute Type Description & Constraints
amountOfTrees integer Required. Number of trees to price. Must be a positive integer.

Example request

Success response

HTTP 200

Error responses


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

Returns the authenticated user's tree orders.

GET/api/tree-ordersCopy Path

Authentication

Required. Use a team API token or legacy personal API token. Test tokens return a canned sample list.

Request

No body. No query parameters.

Example request

Success response

HTTP 200

Error responses