Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jlinn committed Apr 1, 2014
1 parent 0a7952e commit dafd838
Showing 1 changed file with 15 additions and 22 deletions.
37 changes: 15 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,29 @@ $stripe = new Stripe("your_api_key");

#### Customers calls
```php
use Stripe\Request\Customers\CreateCustomerRequest;
use Stripe\Request\Cards\CreateCardRequest;

// create a customer
$request = new CreateCustomerRequest();
$request = $stripe->customers->createCustomerRequest();
$request->setEmail("[email protected]")->setDescription("A customer!");
$customer = $stripe->customers()->createCustomer($request);
$request->setCard(new CreateCardRequest("4242424242424242", 1, 2020));
$customer = $stripe->customers->createCustomer($request);
// get the newly-created customer's id
$customerId = $customer->getId();

// retrieve a customer
$customer = $stripe->customers()->getCustomer("customer_id");
```

#### Charges calls
```php
// create a charge
$request = $stripe->charges->createChargeRequest(350, "usd")->setCustomer($customer->getId());
$stripe->charges->createCharge($request);

// retrieve a charge
$charge = $stripe->charges->getCharge("charge_id");
```

## Development Status
This library is a work in progress. Currently, handling of the following resources has been implemented:

* accounts
* application fees
* balance
* cards
* charges
* coupons
* customers
* discounts
* disputes
* events
* invoice items
* invoices
* plans
* recipients
* subscriptions
* tokens
* transfers
Currently, all Stripe API calls which do not require [Stripe Connect](https://stripe.com/docs/connect) have been implemented. Documentation and Stripe Connect calls are next on the to-do list.

0 comments on commit dafd838

Please sign in to comment.