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

# Stripe Webhook

`POST /api/v1/webhooks/stripe`

Handle Stripe webhook events.

Subscription + auto-refill model:
- checkout.session.completed (mode=subscription): save customer/sub IDs + PM
- customer.subscription.updated: handle tier upgrade/downgrade
- customer.subscription.deleted: cancel — clear active plan
- invoice.paid: grant monthly block credits + reset usage counters
- invoice.payment_failed: mark plan inactive, notify user
- payment_intent.succeeded (auto_refill): informational log only (credits
  are granted synchronously by the auto_refill service)

Expert payouts:
- account.updated, payout.paid, payout.failed (unchanged)

## Response `200`

Successful Response

- unknown

---

[API](https://skmtc.dev/humwork/apis/humwork-ai.md) · [All operations](https://skmtc.dev/humwork/apis/humwork-ai/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/humwork/humwork-ai/revisions/38d9dc5f27e6/schema)
