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

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

nerdysouth/stripe-bundle
========================

Stripe Bundle for Symfony 7.2

v0.1.2(11mo ago)425MITPHPPHP &gt;=8.2

Since Apr 7Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/n3rdysouth/stripe-bundle)[ Packagist](https://packagist.org/packages/nerdysouth/stripe-bundle)[ RSS](/packages/nerdysouth-stripe-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/4eb4dce76a210f7bbc565a64c17067586457bf7ce7065fef5a754304ff6fb929/687474703a2f2f706f7365722e707567782e6f72672f6e65726479736f7574682f7374726970652d62756e646c652f76)](https://packagist.org/packages/nerdysouth/stripe-bundle) [![Total Downloads](https://camo.githubusercontent.com/412dcd1dd0c8142edbc69a33b1a5b9de14abc6700a07481009a58ae9618c5ea0/687474703a2f2f706f7365722e707567782e6f72672f6e65726479736f7574682f7374726970652d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/nerdysouth/stripe-bundle) [![Latest Unstable Version](https://camo.githubusercontent.com/aae346bde0e95c765ed4f10ba6730ec028411d014937181e48258f4797342e81/687474703a2f2f706f7365722e707567782e6f72672f6e65726479736f7574682f7374726970652d62756e646c652f762f756e737461626c65)](https://packagist.org/packages/nerdysouth/stripe-bundle) [![License](https://camo.githubusercontent.com/0c965e189f91e3be0cc75e9d47afac2c5cd8ae53440a2fee06f3d230c896206c/687474703a2f2f706f7365722e707567782e6f72672f6e65726479736f7574682f7374726970652d62756e646c652f6c6963656e7365)](https://packagist.org/packages/nerdysouth/stripe-bundle) [![PHP Version Require](https://camo.githubusercontent.com/1af650fa1e6be261a71b1a09853257ef0ae6293b8f436f69e7126b0d0e4308a1/687474703a2f2f706f7365722e707567782e6f72672f6e65726479736f7574682f7374726970652d62756e646c652f726571756972652f706870)](https://packagist.org/packages/nerdysouth/stripe-bundle)

Stripe Bundle for Symfony
=========================

[](#stripe-bundle-for-symfony)

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

[](#description)

This bundle helps developers do a Stripe integration in a Symfony application for processing payments. The bundle allows you to generate a redirect URL for one-time or recurring subscription payments, using parameters like success URL, failure URL, amount, and optional product or subscription description. The bundle also adds a route for webhooks and fires a custom event on all webhooks from Stripe, as well as stores Transactions and their status using Doctrine, so that logging and tracking successful payments and subscriptions, and other events, is a breeze.

For now, this bundle allows you to:

- Easily create one-time and subscription payment links
- Listen and handle stripe webhooks as Symfony events
- Log &amp; view successful payments and subscriptions in your database

Next Steps
----------

[](#next-steps)

- Add ability to pass custom metadata into transactions and subscriptions

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

[](#installation)

Install the stripe-bundle package with composer:

`composer require nerdysouth/stripe-bundle`

Add the following lines to your `config/routes.yaml` file (modify the path if you prefer a different path):

```
nerdysouth_stripe_webhook:
  path: /webhook/stripe
  controller: NerdySouth\StripeBundle\Controller\StripeWebhookController::handle
  methods: [POST]

```

Add the following lines to your `config/packages/doctrine.yaml` file:

```
doctrine:
    orm:
        mappings:
            NerdySouthStripeBundle:
                is_bundle: true
                type: attribute
                dir: Entity
                prefix: NerdySouth\StripeBundle\Entity
                alias: NerdySouthStripeBundle

```

Run a doctrine schema update to ensure the additional table is added:

`php bin/console doctrine:schema:update -f`

Generating Payment Links
========================

[](#generating-payment-links)

Here is an example controller which will redirect the user to your payment page.

```
