---
title: "Stripe webhook for mu top-up grants (signature-authenticated upstream)"
method: POST
path: "/mu/stripe/webhook"
tags: ["Mu"]
---

# Stripe webhook for mu top-up grants (signature-authenticated upstream)

`POST /mu/stripe/webhook`

## Request

- Base URL: `https://api.mnemom.ai/v1`
- URL: `https://api.mnemom.ai/v1/mu/stripe/webhook`
- Auth: none required

Stripe → api → mnemom-mu grant path (MNE-2516). Accepts Stripe webhook deliveries (e.g. `payment_intent.succeeded`) and forwards them BYTE-VERBATIM to the ledger's `/v1/stripe/webhook` consumer, which verifies the `stripe-signature` header against its webhook secret and fail-closes (401 bad signature, 503 unconfigured). api adds no authentication of its own — the payload, not the transport, is what is authenticated — and no ledger logic. Purchase grants land exactly-once with Stripe provenance; retail grant creation happens ONLY through this path.

## Request body

- object

## Response `200`

Ledger webhook consumer result, passed through verbatim.

- object

## Other responses

- `401`: Ledger consumer rejected the signature. Body is mnemom-mu's VERBATIM error shape (e.g. `{"error":"bad_signature"}`), NOT an api error envelope.
- `403`: Cross-origin write refused (`cross_origin_rejected`). A state-changing request that carries the browser session cookie must come from a first-party origin (`Origin`, or failing that `Referer`) and must not send a form-style body (text/plain, urlencoded, multipart) the operation does not declare. Bearer and API-key callers are never subject to this check.
- `429`: Rate-limit exceeded. The global per-IP limiter (100 requests/minute, applied to every `/v1/*` route) rejected this request. Back off until the window resets — `Retry-After` carries the cooldown in seconds and `X-RateLimit-Reset` the absolute reset time.
- `500`: Server error — request was well-formed but the server failed to fulfill it. Typically a downstream dependency (DB / RPC / external API) returned an unexpected error.
- `502`: An upstream dependency returned an invalid response.
- `503`: Ledger consumer is unconfigured (no webhook secret). Body is mnemom-mu's VERBATIM error shape, NOT an api error envelope.

---

[API](https://skmtc.dev/mnemom/apis/mnemom-api.md) · [All operations](https://skmtc.dev/mnemom/apis/mnemom-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mnemom/apis/mnemom-api/revisions/274b7a6ea182?raw)
