stripe-api-php
A PHP client library for Stripe's API.
Usage
Composer
Installing viaphp composer.phar require jlinn/stripe-api-php
Making API Calls
Initialize the client object
use Stripe\Stripe;
$stripe = new Stripe("your_api_key");
Customers calls
use Stripe\Request\Customers\CreateCustomerRequest;
// create a customer
$request = new CreateCustomerRequest();
$request->setEmail("[email protected]")->setDescription("A customer!");
$customer = $stripe->customers()->createCustomer($request);
// get the newly-created customer's id
$customerId = $customer->getId();
// retrieve a customer
$customer = $stripe->customers()->getCustomer("customer_id");
Development Status
This library is a work in progress. Currently, handling of the following resources has been implemented:
- cards
- charges
- customers
- plans
- subscriptions