Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Stripe PHP bindings

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
.travis.yml
CHANGELOG
LICENSE
README.rdoc
VERSION
composer.json

README.rdoc

Installation

Obtain the latest version of the Stripe PHP bindings with:

git clone https://github.com/stripe/stripe-php

To get started, add the following to your PHP script:

require_once("/path/to/stripe-php/lib/Stripe.php");

Simple usage looks 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;

Documentation

Please see stripe.com/api for up-to-date documentation.

Tests

In order to run tests you have to install SimpleTest (packagist.org/packages/vierbergenlars/simpletest) via Composer (getcomposer.org/) (recommended way):

composer.phar update --dev

Run test suite:

php ./test/Stripe.php
Something went wrong with that request. Please try again.