PHPackages                             rapidwebltd/simplestripe - 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. rapidwebltd/simplestripe

ActiveLibrary[Payment Processing](/categories/payments)

rapidwebltd/simplestripe
========================

SimpleStripe makes it easier than ever to integrate basic Stripe-powered payments into a site. With only a small amount of code you can have a payment form ready to start charging customers.

v1.0.6(8y ago)020LGPL-3.0-onlyPHPPHP &gt;=5.3

Since Nov 9Pushed 8y ago4 watchersCompare

[ Source](https://github.com/rapidwebltd/SimpleStripe)[ Packagist](https://packagist.org/packages/rapidwebltd/simplestripe)[ RSS](/packages/rapidwebltd-simplestripe/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (7)Dependencies (1)Versions (8)Used By (0)

SimpleStripe
============

[](#simplestripe)

This super simple Stripe integration package allow you to integrate a Stripe powered payment form and charge your customers with only a tiny amount of code.

Installation &amp; Dependencies
-------------------------------

[](#installation--dependencies)

This package and its dependencies can be installed using composer.

Just add the package to your composer.json file as follows and run `composer update`.

```
{
  "require": {
       "rapidwebltd/simplestripe": "1.*"
   }
}
```

If your framework does not do so for you, remember to include the autoload files generated by composer, as follows.

```
require_once 'vendor/autoload.php';
```

Setup
-----

[](#setup)

To use SimpleStripe, you must first instantiate the `SimpleStripe` object. To do this, all you need is the Stripe API keys and the currency you wish to take payments in.

```
// Setup SimpleStripe using Stripe API keys and currency
$simpleStripe = \RapidWeb\SimpleStripe\Factories\SimpleStripeFactory::create('PUBLISHABLE_KEY', 'SECRET_KEY', 'GBP');
```

You can find your Stripe API keys within your . You will need both the secret key and the publishable key.

The currency must be presented in ISO 4217 format, such as GBP, USD, EUR.

Displaying payment form
-----------------------

[](#displaying-payment-form)

The following code will display a simple payment form, suitable for taking payment with all common debit and credit cards.

```
// Display a simple payment form
echo $simpleStripe->paymentForm();
```

This code will also include all the necessary JavaScript code to handle client-side communication with Stripe and display of validation errors. The form will post back to the same URL it is displayed upon.

Charging the customer
---------------------

[](#charging-the-customer)

Charging customers is simple. The following code is an example of how you can:

1. Handle the payment form post back
2. Attempt to charge the customer
3. Handle success or failure

```
// If payment form has been submitted
if (isset($_POST['stripeToken'])) {

    // Get the amount to charge (in the currency's lowest denomination)
    $amount = 500; // Five hundred pence = Five pounds (5 GBP)

    // Charge the customer
    $charge = $simpleStripe->charge($amount, $_POST['stripeToken']);

    if ($charge->succeeded) {

        // If charge succeeded, display success messsage, or perhaps redirect the user to a success page
        echo "Success!";
        exit;

    } elseif ($charge->problemType=='Card') {

        // If there was a problem with the card, display details of the problem
        echo $charge->problem;

    } else {

        // Else, display a generic failure message
        echo "Sorry, there was a problem processing your payment.";
    }

}
```

You should include code similar to this towards the top of the page containing your payment form.

Example
-------

[](#example)

For a complete implementation of SimpleStripe, see `src/Example.php`.

License
-------

[](#license)

This library is licensed under the Lesser General Public License version 3.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~74 days

Recently: every ~112 days

Total

7

Last Release

3072d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c580cdf7c14898fff179cdfc1085892091d5d2f49d917873a12365af9ac77c93?d=identicon)[Jord-JD](/maintainers/Jord-JD)

---

Top Contributors

[![Jord-JD](https://avatars.githubusercontent.com/u/650645?v=4)](https://github.com/Jord-JD "Jord-JD (3 commits)")[![kirsty-gasston](https://avatars.githubusercontent.com/u/12949343?v=4)](https://github.com/kirsty-gasston "kirsty-gasston (1 commits)")

---

Tags

payment-formphp-librarystripestripe-powered-paymentsstripelibrarypayment gatewayPHP Librarystripe-paymentsStripe libraryPHP Stripe library

### Embed Badge

![Health badge](/badges/rapidwebltd-simplestripe/health.svg)

```
[![Health](https://phpackages.com/badges/rapidwebltd-simplestripe/health.svg)](https://phpackages.com/packages/rapidwebltd-simplestripe)
```

###  Alternatives

[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3310.1k](/packages/duncanmcclean-statamic-cargo)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

882.2k1](/packages/musahmusah-laravel-multipayment-gateways)[flux-se/sylius-stripe-plugin

Sylius Stripe plugin using Payment Request

1236.3k](/packages/flux-se-sylius-stripe-plugin)[tastyigniter/ti-ext-payregister

Allows you to accept credit card payments using PayPal, Stripe, Authorize.Net and/or Mollie.

1016.7k6](/packages/tastyigniter-ti-ext-payregister)[paymentsuite/stripe-bundle

Stripe PaymentSuite Component

105.0k](/packages/paymentsuite-stripe-bundle)

PHPackages © 2026

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