PHPackages                             advancingu/stripe-subscription-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. advancingu/stripe-subscription-bundle

AbandonedArchivedSymfony-bundle[Payment Processing](/categories/payments)

advancingu/stripe-subscription-bundle
=====================================

Subscription handling via the Stripe API

3462PHP

Since Sep 23Pushed 12y ago2 watchersCompare

[ Source](https://github.com/advancingu/StripeSubscriptionBundle)[ Packagist](https://packagist.org/packages/advancingu/stripe-subscription-bundle)[ RSS](/packages/advancingu-stripe-subscription-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

AdvancinguStripeSubscriptionBundle
==================================

[](#advancingustripesubscriptionbundle)

The AdvancinguStripeSubscriptionBundle provides a simple Symfony service to subscribe users to payable subscriptions using the [Stripe](https://stripe.com)payment service. The bundle also includes an HTML table and JS code to display available subscription plans and allow users to subscribe to a plan using Stripe's payment pop-up window.

An account with [Stripe](https://stripe.com) is required to use this bundle.

Installation
------------

[](#installation)

The bundle requires Symfony 2.2 or greater, the Stripe PHP API, as well as JMSSecurityExtraBundle.

Install the bundle via Composer by adding the following line to your `composer.json` dependencies:

```
"advancingu/stripe-subscription-bundle": "dev-master"

```

Semantic versioning of this bundle will be introduced once it has stabilized further.

Configuration
-------------

[](#configuration)

Sample configuration via `config.yml`:

```
parameters:
    advancingu_stripe_subscription.keys.public: %stripe_public_key%
    advancingu_stripe_subscription.keys.secret: %stripe_secret_key%

advancingu_stripe_subscription:
    stripe_public_key: %advancingu_stripe_subscription.keys.public%
    stripe_secret_key: %advancingu_stripe_subscription.keys.secret%
    payee_name: "ACME Industries Inc."
    plans:
        my_default_plan:                 # The plan's ID as defined with Stripe.
            i18nKey: plan.default.name   # Key inside translation domain for a plan.
            messageDomain: messages      # Translation domain to use for plan name.
            price: 2000                  # In cents.
            currency: CAD                # Three character ISO currency code. Must be supported by your Stripe account.
            role: ROLE_PLAN_DEFAULT           # The lowest user role required for permission to execute actions protected by the plan.
    subscription_check:
        subscribe_route: MyWebsiteBundle_default_subscribe            # Route to redirect to if a user tries to access a resource without or with an insufficient plan.
        subscription_required_i18nKey: subscription.please_subscribe  # Key of the flash message to display.
        subscription_required_message_domain: messages                # Translation domain of flash message.
    trial_role: ROLE_PLAN_TRIAL               # Role name to identify a trial plan subscriber.
    trial_duration: +14 days                  # PHP DateTime modifier string, indicating the duration of a trial
    object_manager: doctrine_mongodb.odm.default_document_manager     # Service ID of the object manager responsible for persisting user instances.

```

To use the included HTML templates, add your Stripe public key to Twig's global variables:

```
twig:
    globals:
        stripe_public_key: "%advancingu_stripe_subscription.keys.public%"

```

To use the security exception listener, add the listener to your firewall in `security.yml`:

```
security:
    firewalls:
        my_firewall:
            access_denied_handler: advancingu_stripe_subscription.access_denied_listener

```

Usage
-----

[](#usage)

Note: Plan role names must start with `ROLE_`, otherwise they will not be picked up by Symfony's default security voters.

Tip: Use role hierarchies to define incremental plans.

License
-------

[](#license)

This bundle is under the MIT license. See the complete license in the bundle:

```
LICENSE

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1aebdcb29ce2756813eaab0ab75f93451a4f661a735dfb130da18b9765551ee9?d=identicon)[advancingu](/maintainers/advancingu)

---

Top Contributors

[![advancingu](https://avatars.githubusercontent.com/u/130207?v=4)](https://github.com/advancingu "advancingu (37 commits)")

### Embed Badge

![Health badge](/badges/advancingu-stripe-subscription-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/advancingu-stripe-subscription-bundle/health.svg)](https://phpackages.com/packages/advancingu-stripe-subscription-bundle)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
