Module: BetterAuth::Stripe
- Defined in:
- lib/better_auth/stripe/hooks.rb,
lib/better_auth/stripe/types.rb,
lib/better_auth/stripe/utils.rb,
lib/better_auth/stripe/schema.rb,
lib/better_auth/stripe/version.rb,
lib/better_auth/stripe/metadata.rb,
lib/better_auth/stripe/middleware.rb,
lib/better_auth/stripe/error_codes.rb,
lib/better_auth/stripe/routes/index.rb,
lib/better_auth/stripe/client_adapter.rb,
lib/better_auth/stripe/plugin_factory.rb,
lib/better_auth/stripe/organization_hooks.rb,
lib/better_auth/stripe/routes/stripe_webhook.rb,
lib/better_auth/stripe/routes/cancel_subscription.rb,
lib/better_auth/stripe/routes/restore_subscription.rb,
lib/better_auth/stripe/routes/subscription_success.rb,
lib/better_auth/stripe/routes/upgrade_subscription.rb,
lib/better_auth/stripe/routes/create_billing_portal.rb,
lib/better_auth/stripe/routes/list_active_subscriptions.rb,
lib/better_auth/stripe/routes/cancel_subscription_callback.rb
Defined Under Namespace
Modules: Hooks, Metadata, Middleware, OrganizationHooks, PluginFactory, Routes, Schema, Types, Utils Classes: ClientAdapter, NamespaceAdapter, ResourceAdapter, WebhooksAdapter
Constant Summary collapse
- VERSION =
"0.6.2"- ERROR_CODES =
{ "UNAUTHORIZED" => "Unauthorized access", "EMAIL_VERIFICATION_REQUIRED" => "Email verification required", "SUBSCRIPTION_NOT_FOUND" => "Subscription not found", "SUBSCRIPTION_PLAN_NOT_FOUND" => "Subscription plan not found", "ALREADY_SUBSCRIBED_PLAN" => "You're already subscribed to this plan", "REFERENCE_ID_NOT_ALLOWED" => "Reference id is not allowed", "CUSTOMER_NOT_FOUND" => "Stripe customer not found for this user", "UNABLE_TO_CREATE_CUSTOMER" => "Unable to create customer", "UNABLE_TO_CREATE_BILLING_PORTAL" => "Unable to create billing portal session", "ORGANIZATION_NOT_FOUND" => "Organization not found", "ORGANIZATION_SUBSCRIPTION_NOT_ENABLED" => "Organization subscription is not enabled", "AUTHORIZE_REFERENCE_REQUIRED" => "Organization subscriptions require authorizeReference callback to be configured", "ORGANIZATION_HAS_ACTIVE_SUBSCRIPTION" => "Cannot delete organization with active subscription", "ORGANIZATION_REFERENCE_ID_REQUIRED" => "Reference ID is required. Provide referenceId or set activeOrganizationId in session", "SUBSCRIPTION_NOT_ACTIVE" => "Subscription is not active", "SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION" => "Subscription is not scheduled for cancellation", "STRIPE_SIGNATURE_NOT_FOUND" => "Stripe signature not found", "STRIPE_WEBHOOK_SECRET_NOT_FOUND" => "Stripe webhook secret not found", "FAILED_TO_CONSTRUCT_STRIPE_EVENT" => "Failed to construct Stripe event", "STRIPE_WEBHOOK_ERROR" => "Stripe webhook error", "INVALID_CUSTOMER_TYPE" => "Customer type must be either user or organization", "INVALID_REQUEST_BODY" => "Invalid request body" }.freeze