| Server IP : 162.214.74.102 / Your IP : 216.73.217.80 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/lrsys/www/lrsys_apps/team/application/libraries/stripe-php/ |
Upload File : |
# Stripe PHP bindings
[](https://travis-ci.org/stripe/stripe-php)
[](https://packagist.org/packages/stripe/stripe-php)
[](https://packagist.org/packages/stripe/stripe-php)
[](https://packagist.org/packages/stripe/stripe-php)
[](https://coveralls.io/r/stripe/stripe-php?branch=master)
You can sign up for a Stripe account at https://stripe.com.
## Requirements
PHP 5.3.3 and later.
## Composer
You can install the bindings via [Composer](http://getcomposer.org/). Add this to your `composer.json`:
{
"require": {
"stripe/stripe-php": "2.*"
}
}
Then install via:
composer.phar install
To use the bindings, use Composer's [autoload](https://getcomposer.org/doc/00-intro.md#autoloading):
require_once('vendor/autoload.php');
## Manual Installation
If you do not wish to use Composer, you can download the [latest release](https://github.com/stripe/stripe-php/releases). Then, to use the bindings, include the `init.php` file.
require_once('/path/to/stripe-php/init.php');
## Getting Started
Simple usage looks like:
\Stripe\Stripe::setApiKey('d8e8fca2dc0f896fd7cb4cb0031ba249');
$myCard = array('number' => '4242424242424242', 'exp_month' => 5, 'exp_year' => 2015);
$charge = \Stripe\Charge::create(array('card' => $myCard, 'amount' => 2000, 'currency' => 'usd'));
echo $charge;
## Documentation
Please see https://stripe.com/docs/api for up-to-date documentation.
## Legacy Version Support
If you are using PHP 5.2, you can download v1.18.0 ([zip](https://github.com/stripe/stripe-php/archive/v1.18.0.zip), [tar.gz](https://github.com/stripe/stripe-php/archive/v1.18.0.tar.gz)) from our [releases page](https://github.com/stripe/stripe-php/releases). This version will continue to work with new versions of the Stripe API for all common uses.
This legacy version may be included via `require_once("/path/to/stripe-php/lib/Stripe.php");`, and used like:
Stripe::setApiKey('d8e8fca2dc0f896fd7cb4cb0031ba249');
$myCard = array('number' => '4242424242424242', 'exp_month' => 5, 'exp_year' => 2015);
$charge = Stripe_Charge::create(array('card' => $myCard, 'amount' => 2000, 'currency' => 'usd'));
echo $charge;
## Tests
In order to run tests first install [PHPUnit](http://packagist.org/packages/phpunit/phpunit) via [Composer](http://getcomposer.org/):
composer.phar update --dev
To run the test suite:
./vendor/bin/phpunit