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

stripe/organization

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.

Stripe organization options

Organization options: enabled (boolean, required), getCustomerCreateParams (function, receives organization and context), onCustomerCreate (function, receives { stripeCustomer, organization } and context).

Stripe with organization plugin

To use organizations as Stripe Customers, set organization.enabled to true in the plugin config and ensure the organization plugin is installed. When enabled: Stripe Customer is automatically created when organization first subscribes, organization name changes are synced to Stripe Customer, organizations with active subscriptions cannot be deleted.

Stripe organization subscription creation

Even with organization customer enabled, user subscriptions remain available as default. To use organization as billing entity, pass customerType: 'organization' when calling subscription.upgrade.

Stripe organization authorization

Implement authorizeReference to verify user has permission to manage subscriptions for an organization. Check membership and role in the authorization function.

Stripe organization billing email

Organization billing email is not automatically synced because organization doesn't have a unique email. Update billing email through Stripe Dashboard or with stripeClient.customers.update(organization.stripeCustomerId, { email: 'billing@company.com' }).

Stripe user deletion with active subscriptions

To prevent user deletion with active subscriptions, use the beforeDelete callback in user config. Check for active subscriptions via stripeClient.subscriptions.list() and throw APIError if found. Organizations with active subscriptions are blocked from deletion automatically.

Give your agent this brain