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

Abandoned → [stripe/stripe-php](/?search=stripe%2Fstripe-php)Symfony-bundle[Payment Processing](/categories/payments)

flosch/stripe-bundle
====================

Symfony 3 bundle to easily integrate Stripe's webpayment SDK into a Symfony project.

2.1.0(7y ago)2947.5k8[7 issues](https://github.com/flo-sch/stripe-bundle/issues)MITPHPCI failing

Since Sep 19Pushed 5y ago3 watchersCompare

[ Source](https://github.com/flo-sch/stripe-bundle)[ Packagist](https://packagist.org/packages/flosch/stripe-bundle)[ Docs](https://github.com/flo-sch/stripe-bundle.git)[ RSS](/packages/flosch-stripe-bundle/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (16)Used By (0)

flosch/stripe-bundle
====================

[](#floschstripe-bundle)

A symfony &gt;= 3 integration for the Stripe PHP SDK

⚠️ IMPORTANT: Before you use this bundle... ⚠️
----------------------------------------------

[](#️-important-before-you-use-this-bundle-️)

Some (rather big!) changes are [coming quite soon](https://support.stripe.com/questions/strong-customer-authentication-sca-enforcement-date) affecting online payment solutions in Europe, impacting the Stripe APIs used by this bundle. [Read this issue carefully](https://github.com/flo-sch/stripe-bundle/issues/15) before using this bundle.

Description
-----------

[](#description)

This bundle allow you to manipulate the stripe SDK as a Symfony service, Plus some helpers to use different Stripe API notions such as Stripe Connect or the Subscriptions API.

**NOTE** : The master branch, and 1.*.* releases target Symfony 3. If you are using Symfony 4, please use the 2.0.0 branch and the 2.*.* releases of this bundle.

### Installation

[](#installation)

To install this bundle, run the command below and you will get the latest version from \[Packagist\]\[3\].

```
composer require flosch/stripe-bundle
```

Load required bundles in AppKernel.php:

```
// app/AppKernel.php
public function registerBundles()
{
  $bundles = array(
    // [...]
    new Flosch\Bundle\StripeBundle\FloschStripeBundle()
  );
}
```

And set-up the required configuration

```
# app/config/config.yml
flosch_stripe:
    stripe_api_key: "%stripe_api_key%" # The Stripe API key can be added as a symfony parameter
```

### Usage

[](#usage)

Then, it is possible to use this service from inside a controller

```
$stripeClient = $this->get('flosch.stripe.client');
```

The StripeClient php class extends the default Stripe PHP SDK class, allowing you to do anything that this SDK can do. Plus, it will automatically be authenticated with your Stripe API Key, which you do not have to worry about at all.

### Extends the client

[](#extends-the-client)

I will always be open to PR in order to update this project, However if you wish to add your own custom helpers, you can easily extend it yourself, for instance :

```
