new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Better Auth · Plugins · all subjects

creem/webhooks

6 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Creem onGrantAccess webhook handler

The `onGrantAccess` handler is called when a user should be granted access. Receives GrantAccessContext with reason, product, customer, and metadata. Handles successful payments, active subscriptions, and trial periods. Requires database persistence enabled.

Creem onRevokeAccess webhook handler

The `onRevokeAccess` handler is called when a user's access should be revoked. Receives RevokeAccessContext with reason, product, customer, and metadata. Handles cancellations, expirations, refunds, and failed payments. Requires database persistence enabled.

Creem grant access reasons

When onGrantAccess is called, the reason field can be: subscription_active (subscription is active), subscription_trialing (subscription is in trial period), or subscription_paid (subscription payment received).

Creem revoke access reasons

When onRevokeAccess is called, the reason field can be: subscription_paused (subscription paused by user or admin), subscription_expired (subscription expired without renewal), or subscription_period_end (current subscription period ended without renewal).

Creem granular webhook event handlers

For fine-grained control, the plugin supports: onCheckoutCompleted (FlatCheckoutCompleted), onRefundCreated (FlatRefundCreated), onDisputeCreated (FlatDisputeCreated), onSubscriptionActive (FlatSubscriptionEvent), onSubscriptionTrialing (FlatSubscriptionEvent), onSubscriptionCanceled (FlatSubscriptionEvent), onSubscriptionPaid (FlatSubscriptionEvent), onSubscriptionExpired (FlatSubscriptionEvent), onSubscriptionUnpaid (FlatSubscriptionEvent), onSubscriptionUpdate (FlatSubscriptionEvent), onSubscriptionPastDue (FlatSubscriptionEvent), onSubscriptionPaused (FlatSubscriptionEvent).

Creem validateWebhookSignature function

Use `validateWebhookSignature(payload, signature, CREEM_WEBHOOK_SECRET)` to verify webhook signatures in custom webhook endpoints. Returns boolean indicating validity. The signature header is `creem-signature`.

Give your agent this brain