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

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

bartpie/stripe-bundle
=====================

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

2.1.0(7y ago)03MITPHP

Since Sep 19Pushed 5y agoCompare

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

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

stripe-bundle
=============

[](#stripe-bundle)

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

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 :

```
