---
title: "Donate USDC over x402"
method: POST
path: "/api/x402/donate"
tags: ["payments"]
---

# Donate USDC over x402

`POST /api/x402/donate`

## Request

- Base URL: `https://www.immersivecommons.com`
- URL: `https://www.immersivecommons.com/api/x402/donate`
- Auth: none required

No IC membership and no token. A bare POST answers 402 with one `accepts[]` entry per configured tier; re-send with the signed authorization in the `X-PAYMENT` header to pay. The donor wall is only written AFTER on-chain settlement, so a 200 here is a settled gift. Returns 404 while X402_ENABLED is off.

## Headers

- `X-PAYMENT` string

## Response `200`

The donation settled on-chain.

- X402DonateResponse
  - `ok` boolean, required
  - `donated_usd` number, required: The settled amount, in USD.
  - `tx` string, nullable: On-chain transaction, when the facilitator returned one.
  - `message` string
  - `wall_url` string: Where the gift appears.
  - `via` string, required: Always x402.

## Other responses

- `400`: Body present but not valid JSON. A MALFORMED payment is a 402, not a 400 — it re-issues the challenge.
- `402`: Payment required — the body lists every acceptable tier.
- `404`: The paid door is disabled (X402_ENABLED is not true).
- `429`: Per-payer donation rate limit exceeded.
- `502`: Settlement failed at the facilitator.
- `503`: Payment rails or rate limiter unavailable — the door fails closed.

---

[API](https://skmtc.dev/immersivecommons/apis/immersive-commons-agent-rest-api.md) · [All operations](https://skmtc.dev/immersivecommons/apis/immersive-commons-agent-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/immersivecommons/apis/immersive-commons-agent-rest-api/revisions/be67c1f67c27?raw)
