Skip to content
Andreas Michael edited this page Nov 30, 2026 · 4 revisions

Stripe Integration

The ESN Membership Manager uses Stripe to generate payment links and process payments for ESNcards, including automatic price differentiation for ESNers (ESN Volunteers and Alumni).

Prerequisites

  • A verified Stripe Account.
  • Access to the Developers section in the Stripe Dashboard.
  • Omnia Stripe Configuration: Your Stripe Secret Key (sk_live_... or sk_test_...) must first be configured in Omnia Settings.

Caution

Never share your Secret Key. Ensure you use Test keys for development/staging and Live keys for production.

1. Webhook Setup

The module uses Stripe webhooks to confirm successful payments, automatically assign an ESNcard number from inventory (or place the application in the backlog if stock is empty), sync to Weeztix/Google Sheets, and email the member.

  1. Log in to your Stripe Dashboard.
  2. Navigate to Developers > Webhooks.
  3. Click Add endpoint.
  4. Endpoint URL: https://your-domain.com/stripe/webhook
    • Note: Replace your-domain.com with your actual site domain.
  5. Events to send: Select checkout.session.completed.
  6. Click Add endpoint.
  7. Reveal the Signing secret (starts with whsec_...).
  8. Copy this secret to the module configuration (/admin/config/system/esn-membership-manager):
    • Field: Stripe Webhook Secret

2. Product Configuration

You need to create products in Stripe for both standard members and ESNers (ESN Volunteer and ESN Alumnus). Optional processing fee products can also be configured for each tier.

Standard Pricing

Product 1: The ESNcard (Required)

  1. Go to Products > Add Product.
  2. Name: ESNcard (or similar).
  3. Pricing Model: Standard pricing (One-time).
  4. Price: Enter the standard cost of the card (e.g., €15.00).
  5. Save the product and copy the Price ID (starts with price_...).
    • Field: Stripe Price ID for ESNcard

Product 2: Processing Fee (Optional)

To cover online payment gateway expenses, you can add a separate processing fee line item:

  1. Go to Products > Add Product.
  2. Name: Processing Fee.
  3. Pricing Model: Standard pricing (One-time).
  4. Price: Enter the fee amount (e.g., €0.50).
  5. Save the product and copy the Price ID.
    • Field: Stripe Price ID for Processing Fee

ESNer Pricing (Volunteers & Alumni)

When an approved applicant has a Mobility Status of ESN Volunteer or ESN Alumnus, the module automatically generates a payment link using the ESNer Price IDs.

Product 3: ESNer ESNcard (Required)

  1. Create a product (or a second price on your ESNcard product) with the discounted ESNer price.
    • Tip: If your section does not offer a discount to ESNers, you can reuse the standard ESNcard Price ID here.
  2. Copy the Price ID.
    • Field: Stripe Price ID for ESNer ESNcard

Product 4: ESNer Processing Fee (Optional)

  1. Create a processing fee price for ESNers (or leave blank to fall back to the standard processing fee if configured).
  2. Copy the Price ID.
    • Field: Stripe Price ID for ESNer Processing Fee

Payment Lifecycle

  1. When an officer approves an ESNcard application, the module creates a Stripe Payment Link containing the appropriate ESNcard (and optional Processing Fee) line items with application_id stored in metadata.
  2. The payment link is emailed to the applicant and displayed on their Member Dashboard.
  3. When payment succeeds, Stripe fires checkout.session.completed to /stripe/webhook.
  4. The module marks the application as Paid, assigns the next available ESNcard number (or BACKLOGGED if inventory is depleted), disables the payment link if deleted later, and triggers downstream integrations (Weeztix, Google Sheets, Digital Wallets, and assignment email).

Clone this wiki locally