packages feed

stripe-0.1: README.mkd

Created by [Michael Schade](http://mschade.me/)
([@michaelschade](https://twitter.com/intent/user?screen_name=michaelschade)).

Description
===========

This is an *unofficial* Haskell implementation of the [Stripe API][sapi].

**Note** that this has worked in my tests, but I have not used it in production
yet. Try it thoroughly and let me know if you
[find any bugs](https://github.com/michaelschade/hs-stripe/issues) or
[have any improvements](http://help.github.com/send-pull-requests/).

Example Usage
=============

```haskell
import Web.Stripe.Charge  ( Charge(..), Amount(..), Count(..), Currency(..)
                          , Offset(..), getCharges
                          )
import Web.Stripe.Client  ( APIKey(..), SConfig, defaultConfig, runStripeT )

conf :: SConfig
conf  = defaultConfig $ APIKey ""

main :: IO ()
main  = do
    amounts <- runStripeT conf $ do
        charges <- getCharges Nothing (Just $ Count 5) (Just $ Offset 1)
        return   $ map getAmt charges
    either err (putStrLn . show) amounts
    where
        getAmt c = (unAmount $ chargeAmount c, unCurrency $ chargeCurrency c)
        err _    = putStrLn "Uh-oh! It didn't work :-("
```

Which produces the output along the lines of:
`[(842,"usd"),(2048,"usd"),(1010,"usd"),(4096,"usd"),(4200,"usd")]`.

Limitations
===========

* This package currently does not implement Stripe invoices.

Help
====

First, consult the Haddock and [Stripe API][sapi] docs to be certain you're
using the API correctly. It's a good idea to
[try another library](https://stripe.com/docs/libraries) first to see if it
works there. If you think you might be misunderstanding the API, or having an
issue with Stripe itself, it's best to
[contact them](https://stripe.com/help/contact).

If all of that fails, or if you otherwise think it's an issue with this
implementation of the API, please submit an issue here. Better yet, submit
a pull request with a proposed solution!

License
=======

I like the MIT license. See `LICENSE`.

[sapi]: https://stripe.com/docs/api "Stripe API"