PHPackages                             cubicmushroom/stripe-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. cubicmushroom/stripe-bundle

ActiveLibrary[Payment Processing](/categories/payments)

cubicmushroom/stripe-bundle
===========================

Symfony bundle for handling Stripe payments

v2.7.3(8y ago)0141MITPHP

Since Apr 23Pushed 8y ago1 watchersCompare

[ Source](https://github.com/cubicmushroom/stripe-bundle)[ Packagist](https://packagist.org/packages/cubicmushroom/stripe-bundle)[ RSS](/packages/cubicmushroom-stripe-bundle/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (6)Versions (7)Used By (0)

Stripe Payment Bundle
=====================

[](#stripe-payment-bundle)

Symfony bundle to add support for Stripe payments

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

[](#installation)

Using composer...

```
$ composer require "cubicmushroom/stripe-bundle" "dev-master"

```

Symfony Setup
-------------

[](#symfony-setup)

Register bundle by adding the following line to your AppKernel file...

```
// app/AppKernel.php
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            //...
            new CubicMushroom\Symfony\StripeBundle\CMStripeBundle(),
            //...
        );

        // ...
    }

    // ...
}

```

Add the following to your `app/config.yml` file...

```
cm_stripe:
    api_publishable_key:  %cm_stripe.api_publishable_key%
    api_secret_key:       %cm_stripe.api_secret_key%

```

... and the following to your `parameters.yml.dist`/`parameters.yml`, replacing the '~'s with your API details in the `parameters.yml` file...

```
parameters:
    ...

    # Stripe Bundle
    cm_stripe.api_publishable_key:  ~
    cm_stripe.api_secret_key:       ~

```

Load JavaScript library
-----------------------

[](#load-javascript-library)

### Stripe JS file &amp; API key

[](#stripe-js-file--api-key)

Add the following twig function call to your page templates for pages that contain Stripe payment forms...

```
{{ cm_stripe_api_script() }}

```

This injects the Stripe API JavaScript file, along with your public key into the page.

### Bundle JS file

[](#bundle-js-file)

First ensure the bundle assets are installed using the `app/console assets:install` command.

Add the following script tag to your page's JavaScript files...

If using assetic...

```
{% javascripts
{#...#}
'@CMStripeBundle/Resources/public/js/stripe-bundle.js'
{#...#}
output='compiled/js/app.js' %}

{% endjavascripts %}

```

... or if not using assetic...

```

```

Customising error messages
--------------------------

[](#customising-error-messages)

The error messages displayed by the plugin are attached to the .stripe-errors form element (must be within the related form), which is added to the top of the form if it doesn't already exist.

You can customise the format of these errors using the `StripeBundle.EVENTS.FORMAT_ERROR_MSG` event that's fired on the Stripe form's form tag by using something similar to the following...

```
(function ($) {
    'use strict';

    //noinspection JSLint,JSUnusedLocalSymbols
    /**
     *
     * @param {Event} event
     * @param {{errorMessage: string}} errorDetails
     */
    function addStripeErrorFormatting(event, errorDetails) {
        errorDetails.errorMessage = '' + errorDetails.errorMessage + '';
    }

    $(function () {
        $('form.stripe-form').on(StripeBundle.EVENTS.FORMAT_ERROR_MSG, addStripeErrorFormatting);
    });
}(jQuery));

```

TakePaymentCommand form
-----------------------

[](#takepaymentcommand-form)

The bundle provides a form type called `cm_stripe_take_payment`. This can be used to display a Stripe payment form, along with the other TakePaymentCommand fields.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~146 days

Total

5

Last Release

3139d ago

Major Versions

1.0.0 → 2.7.02016-04-24

### Community

Maintainers

![](https://www.gravatar.com/avatar/b156769d704438a2a9e79cd9f7b7a01c8a7b17a191b389469ae55de8f0c982a6?d=identicon)[ToG](/maintainers/ToG)

---

Top Contributors

[![toby-griffiths](https://avatars.githubusercontent.com/u/4817007?v=4)](https://github.com/toby-griffiths "toby-griffiths (137 commits)")

### Embed Badge

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

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)

PHPackages © 2026

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