---
title: "Stripe Webhook"
method: POST
path: "/api/stripe/webhook"
tags: ["Stripe"]
---

# Stripe Webhook

`POST /api/stripe/webhook`

Handle Stripe webhooks for metered billing.

Events handled:
- invoice.created: Report usage to Stripe before invoice finalization
- invoice.paid: Record successful payment
- invoice.payment_failed: Handle failed payment
- customer.subscription.created: New subscription
- customer.subscription.deleted: Subscription cancelled

## Headers

- `Stripe-Signature` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/shofo/apis/shofo-api.md) · [All operations](https://skmtc.dev/shofo/apis/shofo-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/shofo/shofo-api/revisions/9fbdf65aab60/schema)
