stripe-haskell-0.1.4.2: Stripe API for Haskell

Copyright(c) David Johnson, 2014
Maintainerdjohnson.m@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Web.Stripe

Contents

Description

https://stripe.com/docs/api

import Web.Stripe         
import Web.Stripe.Account

main :: IO ()
main = do
  let config = SecretKey "secret_key"
  result <- stripe config getAccountDetails
  case result of
    Right details -> print details
    Left stripeError -> print stripeError

Synopsis

Execute a Stripe action

stripe :: FromJSON a => StripeConfig -> Stripe a -> IO (Either StripeError a) Source

Create a request to Stripe's API

Execute a custom Stripe action (build your own, useful if

stripeRaw :: FromJSON a => StripeConfig -> StripeRequest -> IO (Either StripeError a) Source

Create a custom request to Stripe's API, Build your own! Useful if you're using an old api) !

Stripe Monad

Stripe Secret Key

data StripeConfig Source

Stripe secret key

Constructors

StripeConfig 

Instances

Stripe Request creator

data StripeRequest Source

Stripe Request holding Method, URL and Params for a Request

Constructors

StripeRequest 

Fields

method :: Method

Method of StripeRequest (i.e. GET, PUT, POST, PUT)

endpoint :: Text

Endpoint of StripeRequest

queryParams :: Params

Query Parameters of StripeRequest

Instances

Types

data StripeErrorHTTPCode Source

Error Codes for HTTP Responses