Skip to content

Membership configuration

Membership Configuration

This guide provides an overview of the membership feature in Bilberry, its key concepts, and how to configure it for your website. The membership feature enables businesses to sell and manage memberships, giving customers access to various services and products, as well as the ability to book timeslots and view their account details.

About the Membership Feature

The membership feature allows businesses to offer a variety of membership options, including:

  • Recurring memberships: Subscriptions with automatic payments (e.g., monthly gym memberships).
  • One-time memberships: Single-purchase access to services.
  • Punch cards: Prepaid access with a limited number of uses.

Customers can use their memberships for booking timeslots (e.g., for gyms or saunas) or purchasing other products or activities. Additionally, customers can access a personalized “My Page” embedded on your website, where they can:

  • View upcoming bookings.
  • Manage memberships and value cards.
  • Update profile information.

Key Concepts and Terminology

Company

A company represents a business using the Membership API. Each company:

  • Has its own tenant in Auth0 for authentication and user management.
  • Maintains a list of sites associated with its operations.

Site

A site represents a physical or operational location where activities occur (e.g., a gym or park). Sites have:

  • Their own Bilberry instance.
  • Their own NETS instance for payment processing.

Relationship with Company:

  • A company can have multiple sites.
  • Sites inherit configurations and user authentication from the company level.

User

Users represent customers and are managed via Auth0. Key attributes include:

  • Company-wide Access: Users are associated with a company rather than a specific site. This allows for shared value cards and consistent branding across sites.
  • Authentication: Actions like purchasing or using value cards require users to log in.
  • Uniqueness: Users are unique based on a combination of their email address and company ID.

Value Cards

Value Cards

These are specific cards owned by users, containing details like purchase date, expiration, and owner information. Customers can use value cards to pay for bookings or products.

Value Card Products

These represent the different types of value cards available for purchase (e.g., standard memberships, family punch cards). They include details like price, configurations, and company association.

Value Card Product Types

The highest-level categorization of value cards, including:

  • Memberships.
  • Punch cards (e.g., family or business).

Value Card Usages

Each time a value card is used, a record is created with details such as:

  • Timestamp of use.
  • Booking ID.
  • Credits used.

The remaining credits are calculated by subtracting usages from the card’s maximum capacity.

Value Card Campaigns

Campaigns allow businesses to offer discounts or promotions on value cards for a specified time period. Campaign details (e.g., name, discounted price) appear in the widgets as banners.

Subscriptions

Subscriptions are recurring value card products with monthly payments. Once set up, a subscription ID links the user’s order or value card to the recurring payment plan, which continues until canceled.

Payments When Using Value Cards

When a user pays with value cards, the system determines the optimal payment flow:

  1. Prioritization: Value cards are prioritized based on their configuration (e.g., using memberships without credits before those with credits).

  2. Automatic Optimization: The system selects the most beneficial payment method for the user, maximizing value card usage and minimizing cash payment.

  3. User Choice: Users can override the default selection and choose alternative legal payment methods (e.g., using only cash or specific value cards).

Membership Configuration

To enable membership and timeslot widgets, add the following configuration to your website:

window.BilberryWidgetsGlobal.loginRedirectUrl = 'https://mypage.com'; // Redirect after login
window.BilberryWidgetsGlobal.companyKey = 'mycompany'; // Company identifier
window.BilberryWidgetsGlobal.siteKey = 'mysite'; // Site identifier
window.BilberryWidgetsGlobal.auth0Domain = 'mycompany.eu.auth0.com'; // Auth0 domain
window.BilberryWidgetsGlobal.auth0ClientId = 'myclientid'; // Auth0 client ID
window.BilberryWidgetsGlobal.auth0Audience = 'https://mycompany.bilberry.app'; // API audience

How to Obtain Configuration Details:

  1. From Bilberry Backoffice: You can retrieve the companyKey, siteKey, and other configuration details directly from the Bilberry Backoffice application.

  2. From Auth0 Dashboard: For Auth0-specific details (e.g., auth0Domain and auth0ClientId), access your Auth0 dashboard or contact Bilberry Support for assistance.

Key Points to Remember

  1. Centralized User Management: Users are managed at the company level for consistent access and branding across sites.

  2. Configuring “My Page”: The loginRedirectUrl should point to the page where users can manage their bookings, memberships, and profile information.

  3. Payment Flows: Value cards are automatically prioritized to optimize user benefits, but manual overrides are allowed.

  4. Ask for Help: If you’re unsure about configuration details, contact Bilberry Support or consult the Bilberry Backoffice for guidance.

By following this setup, you can effectively configure the membership feature for your business, enabling seamless user experiences and efficient management of memberships and value cards.