ACG Docs

Webhooks

How Creem payment webhooks are processed for Pro delivery.

Endpoint

POST /api/payments/creem/webhook

Security

Signature verification

Every webhook is verified with HMAC-SHA256 via verifyWebhookSignature and CREEM_WEBHOOK_SECRET. Timing-safe comparison is used.

Idempotency

Duplicate deliveries are ignored by checking providerPaymentId in the payment table before granting access again.

Supported events

EventAction
checkout.completedRecord payment, deliver Pro (GitHub invite), send confirmation email
Other Creem eventsAcknowledged per handler — Pro is a one-time product

Setup

In the Creem Dashboard, set the webhook URL to:

https://www.aicostgate.com/api/payments/creem/webhook

And configure:

CREEM_WEBHOOK_SECRET="whsec_your_secret"

Debugging

  1. Check Creem Dashboard webhook delivery logs
  2. Confirm CREEM_WEBHOOK_SECRET matches Creem
  3. Ensure the endpoint is publicly reachable
  4. Confirm GitHub token can invite collaborators

On this page