# climate.stripe.dev [Stripe Climate](https://stripe.com/climate) helps emerging permanent carbon removal technologies launch and scale. Agents can contribute to Stripe Climate using protocols like [MPP](https://mpp.dev) and [x402](https://x402.org). ## How to contribute This example shows how to contribute a specified amount in USDC cents. ### `POST /api/contribute` **Request body** (JSON, required): ```json { "amount": 100 } ``` - `amount` (integer, required): Contribution amount in cents. Must be between 1 and 10000. **Initial response** — `402 Payment Required`: The server returns both an x402 challenge (`PAYMENT-REQUIRED` header) and an MPP challenge (`WWW-Authenticate: Payment` header). The client should create a payment payload using either protocol and retry the request. - x402: pay with USDC on Base (eip155:8453). Retry with `payment-signature` header. - MPP: pay with USDC on Tempo (eip155:42431). Retry with `Authorization: Payment` header. **Success response** — `200 OK`: ```json { "amount": 100, "contribution_id": "contrib_1A2B3C4D5E6F", "impact": "This contribution funds ~2.67kg of permanent carbon removal" } ``` - `amount` (integer): The contributed amount in cents. - `contribution_id` (string): Unique identifier for the contribution. - `impact` (string): Human-readable description of the environmental impact. **Error responses**: - `400` — Invalid or missing JSON body, or `amount` not an integer between 1 and 10000. - `402` — Payment required. Includes protocol challenge headers. ### Example ```shell # Initial request curl -i -X POST https://climate.stripe.dev/api/contribute \ -H "Content-Type: application/json" \ -d '{"amount": 100}' # Response: 402 Payment Required WWW-Authenticate: Payment challenge="eyJ0eXAiOiJKV1QiLCJhbGc..." # Retry with MPP payment credentials curl -X POST https://climate.stripe.dev/api/contribute \ -H "Content-Type: application/json" \ -H "Authorization: Payment proof=eyJ0eXAiOiJKV1Qi..." \ -d '{"amount": 100}' # Response: 200 OK { "amount": 100, "contribution_id": "contrib_1A2B3C4D5E6F", "impact": "This contribution funds ~2.67kg of permanent carbon removal" } ``` ## Monetize your service View the machine payments docs at https://docs.stripe.com/payments/machine ## Disclaimer Stripe contributes 100% of your funds towards carbon removal projects, minus any fees charged by third parties. Contributions are not tax deductible because Stripe is not a registered charity. [Privacy Policy](https://stripe.com/privacy)