Skip to content

Webhooks

All endpoints are prefixed with /v1.


POST /v1/webhook/stripe

Authentication: None (verified via stripe-signature header against STRIPE_WEBHOOK_SECRET).

Receives Stripe events, verifies the signature, and routes to the appropriate handler.

EventAction
checkout.session.completedUpdates the payment record to paid. Handles wallet deposits by crediting the user balance. Routes to the appropriate app extension handler (e.g., courses, bundles, subscriptions) based on payment metadata.
customer.subscription.createdUpdates the user’s profile subscription status and records the subscription details.
customer.subscription.updatedUpdates the user’s profile subscription status when plan changes or renewals occur.
customer.subscription.deletedCancels the subscription and updates the user’s profile status.
account.updatedUpdates the Stripe Connect account status for the connected user.
{ "received": true }

POST /v1/webhook/payment-succeeded

Authentication: API key (X-API-Key header).

Routes payment confirmations to the correct app handler. Called internally after Stripe confirms a payment. The payment metadata contains the app_slug which determines which extension’s payment-succeeded action is invoked.

  1. Validate the API key.
  2. Look up the payment record.
  3. Determine the target app from payment metadata.
  4. Invoke the app’s payment-succeeded action handler.

POST /v1/ads/{id}/impression

Authentication: None (public).

Records an ad view. Called client-side when an ad is displayed to a user.

ParameterLocationTypeRequiredDescription
idpathstringYesThe ad ID (UUID)
  • Increments the ad’s impression count.
  • Checks the ad’s budget against total spend.
  • Auto-pauses the ad if impressions exceed the budget threshold.

Returns 200 on success.


POST /v1/reports

Authentication: Required (Bearer token or API key).

Submit a content report for moderation review.

FieldTypeRequiredDescription
reportable_idstringYesUUID of the reported resource.
reportable_typestringYesType of resource. One of: post, user, product, comment.
reasonstringYesReason for the report.
descriptionstringNoAdditional details about the report.

Returns 201 Created on success.

{
"id": "uuid",
"reportable_id": "uuid",
"reportable_type": "post",
"reason": "spam",
"description": "This post contains spam links.",
"created_at": "2026-03-30T12:00:00Z"
}