Copyright | (c) David Johnson 2014 |
---|---|
Maintainer | djohnson.m@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
https://stripe.com/docs/api#transfers
{-# LANGUAGE OverloadedStrings #-} import Web.Stripe import Web.Stripe.Transfer import Web.Stripe.Recipient main :: IO () main = do let config = StripeConfig (StripeKey "secret_key") result <- stripe config $ getRecipient (RecipientId "recipient_id") case result of (Left stripeError) -> print stripeError (Right (Recipient { recipientId = recipientid })) -> do result <- stripe config $ createTransfer recipientid (Amount 100) USD case result of Left stripeError -> print stripeError Right transfer -> print transfer
Synopsis
- data CreateTransfer
- createTransfer :: RecipientId -> Amount -> Currency -> StripeRequest CreateTransfer
- data GetTransfer
- getTransfer :: TransferId -> StripeRequest GetTransfer
- data UpdateTransfer
- updateTransfer :: TransferId -> StripeRequest UpdateTransfer
- data CancelTransfer
- cancelTransfer :: TransferId -> StripeRequest CancelTransfer
- data GetTransfers
- getTransfers :: StripeRequest GetTransfers
- newtype Amount = Amount {}
- newtype BankAccountId = BankAccountId Text
- data Card = Card {
- cardId :: CardId
- cardObject :: Text
- cardLastFour :: Text
- cardBrand :: Brand
- cardFunding :: Text
- cardExpMonth :: ExpMonth
- cardExpYear :: ExpYear
- cardFingerprint :: Text
- cardCountry :: Maybe Text
- cardName :: Maybe Name
- cardAddressLine1 :: Maybe AddressLine1
- cardAddressLine2 :: Maybe AddressLine2
- cardAddressCity :: Maybe AddressCity
- cardAddressState :: Maybe AddressState
- cardAddressZip :: Maybe AddressZip
- cardAddressCountry :: Maybe AddressCountry
- cardCVCCheck :: Maybe Text
- cardAddressLine1Check :: Maybe Text
- cardAddressZipCheck :: Maybe Text
- cardCustomerId :: Maybe (Expandable CustomerId)
- cardMetaData :: MetaData
- newtype CardId = CardId Text
- newtype Created = Created UTCTime
- data Currency
- = AED
- | AFN
- | ALL
- | AMD
- | ANG
- | AOA
- | ARS
- | AUD
- | AWG
- | AZN
- | BAM
- | BBD
- | BDT
- | BGN
- | BIF
- | BMD
- | BND
- | BOB
- | BRL
- | BSD
- | BWP
- | BZD
- | CAD
- | CDF
- | CHF
- | CLP
- | CNY
- | COP
- | CRC
- | CVE
- | CZK
- | DJF
- | DKK
- | DOP
- | DZD
- | EEK
- | EGP
- | ETB
- | EUR
- | FJD
- | FKP
- | GBP
- | GEL
- | GIP
- | GMD
- | GNF
- | GTQ
- | GYD
- | HKD
- | HNL
- | HRK
- | HTG
- | HUF
- | IDR
- | ILS
- | INR
- | ISK
- | JMD
- | JPY
- | KES
- | KGS
- | KHR
- | KMF
- | KRW
- | KYD
- | KZT
- | LAK
- | LBP
- | LKR
- | LRD
- | LSL
- | LTL
- | LVL
- | MAD
- | MDL
- | MGA
- | MKD
- | MNT
- | MOP
- | MRO
- | MUR
- | MVR
- | MWK
- | MXN
- | MYR
- | MZN
- | NAD
- | NGN
- | NIO
- | NOK
- | NPR
- | NZD
- | PAB
- | PEN
- | PGK
- | PHP
- | PKR
- | PLN
- | PYG
- | QAR
- | RON
- | RSD
- | RUB
- | RWF
- | SAR
- | SBD
- | SCR
- | SEK
- | SGD
- | SHP
- | SLL
- | SOS
- | SRD
- | STD
- | SVC
- | SZL
- | THB
- | TJS
- | TOP
- | TRY
- | TTD
- | TWD
- | TZS
- | UAH
- | UGX
- | USD
- | UYU
- | UZS
- | VND
- | VUV
- | WST
- | XAF
- | XCD
- | XOF
- | XPF
- | YER
- | ZAR
- | ZMW
- | UnknownCurrency
- newtype Date = Date UTCTime
- newtype Description = Description Text
- newtype EndingBefore a = EndingBefore a
- newtype ExpandParams = ExpandParams {
- getExpandParams :: [Text]
- data Recipient
- = Recipient {
- recipientId :: RecipientId
- recipientObject :: Text
- recipientCreated :: UTCTime
- recipientLiveMode :: Bool
- recipientType :: RecipientType
- recipientDescription :: Maybe Description
- recipientEmail :: Maybe Email
- recipientName :: Name
- recipientVerified :: Bool
- recipientActiveAccount :: Maybe BankAccount
- recipientCards :: StripeList RecipientCard
- recipientDefaultCard :: Maybe (Expandable RecipientCardId)
- | DeletedRecipient { }
- = Recipient {
- newtype RecipientId = RecipientId Text
- newtype StartingAfter a = StartingAfter a
- newtype StatementDescription = StatementDescription Text
- data StripeList a = StripeList {}
- data Transfer = Transfer {
- transferId :: TransferId
- transferObject :: Text
- transferCreated :: UTCTime
- transferDate :: UTCTime
- transferLiveMode :: Bool
- transferAmount :: Int
- transferCurrency :: Currency
- transferStatus :: TransferStatus
- transferType :: TransferType
- transferBalanceTransaction :: Expandable TransactionId
- transferDescription :: Maybe Description
- transferBankAccount :: Maybe BankAccount
- transferFailureMessage :: Maybe Text
- transferFailureCode :: Maybe Text
- transferStatementDescription :: Maybe StatementDescription
- transferRecipient :: Maybe (Expandable RecipientId)
- transferMetaData :: MetaData
- newtype TransferId = TransferId Text
- data TransferStatus
- data TransferType
- newtype Limit = Limit Int
API
data CreateTransfer Source #
Instances
StripeHasParam CreateTransfer Description Source # | |
Defined in Web.Stripe.Transfer | |
StripeHasParam CreateTransfer MetaData Source # | |
Defined in Web.Stripe.Transfer | |
StripeHasParam CreateTransfer BankAccountId Source # | |
Defined in Web.Stripe.Transfer | |
StripeHasParam CreateTransfer CardId Source # | |
Defined in Web.Stripe.Transfer | |
StripeHasParam CreateTransfer StatementDescription Source # | |
Defined in Web.Stripe.Transfer | |
type StripeReturn CreateTransfer Source # | |
Defined in Web.Stripe.Transfer |
:: RecipientId | The |
-> Amount | |
-> Currency | |
-> StripeRequest CreateTransfer |
Create a Transfer
data GetTransfer Source #
Instances
StripeHasParam GetTransfer ExpandParams Source # | |
Defined in Web.Stripe.Transfer | |
type StripeReturn GetTransfer Source # | |
Defined in Web.Stripe.Transfer |
:: TransferId |
|
-> StripeRequest GetTransfer |
Retrieve a Transfer
data UpdateTransfer Source #
Instances
StripeHasParam UpdateTransfer Description Source # | |
Defined in Web.Stripe.Transfer | |
StripeHasParam UpdateTransfer MetaData Source # | |
Defined in Web.Stripe.Transfer | |
type StripeReturn UpdateTransfer Source # | |
Defined in Web.Stripe.Transfer |
:: TransferId | The |
-> StripeRequest UpdateTransfer |
Update a Transfer
data CancelTransfer Source #
Instances
type StripeReturn CancelTransfer Source # | |
Defined in Web.Stripe.Transfer |
:: TransferId | The |
-> StripeRequest CancelTransfer |
Cancel a Transfer
data GetTransfers Source #
Instances
StripeHasParam GetTransfers ExpandParams Source # | |
Defined in Web.Stripe.Transfer | |
StripeHasParam GetTransfers Limit Source # | |
Defined in Web.Stripe.Transfer | |
StripeHasParam GetTransfers RecipientId Source # | |
Defined in Web.Stripe.Transfer | |
StripeHasParam GetTransfers TransferStatus Source # | |
Defined in Web.Stripe.Transfer | |
StripeHasParam GetTransfers Date Source # | |
Defined in Web.Stripe.Transfer | |
StripeHasParam GetTransfers Created Source # | |
Defined in Web.Stripe.Transfer | |
StripeHasParam GetTransfers (EndingBefore TransferId) Source # | |
Defined in Web.Stripe.Transfer | |
StripeHasParam GetTransfers (StartingAfter TransferId) Source # | |
Defined in Web.Stripe.Transfer | |
type StripeReturn GetTransfers Source # | |
Defined in Web.Stripe.Transfer |
getTransfers :: StripeRequest GetTransfers Source #
Retrieve StripeList of Transfers
Types
Amount representing a monetary value. Stripe represents pennies as whole numbers i.e. 100 = $1
Instances
newtype BankAccountId Source #
Instances
Card
Object
Instances
Eq Card Source # | |
Data Card Source # | |
Defined in Web.Stripe.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Card -> c Card # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Card # dataTypeOf :: Card -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Card) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Card) # gmapT :: (forall b. Data b => b -> b) -> Card -> Card # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Card -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Card -> r # gmapQ :: (forall d. Data d => d -> u) -> Card -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Card -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Card -> m Card # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Card -> m Card # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Card -> m Card # | |
Ord Card Source # | |
Read Card Source # | |
Show Card Source # | |
FromJSON Card Source # | JSON Instance for |
CardId for a Customer
Instances
Instances
Stripe supports 138 currencies
AED | United Arab Emirates Dirham |
AFN | Afghan Afghani |
ALL | Albanian Lek |
AMD | Armenian Dram |
ANG | Netherlands Antillean Gulden |
AOA | Angolan Kwanza |
ARS | Argentine Peso |
AUD | Australian Dollar |
AWG | Aruban Florin |
AZN | Azerbaijani Manat |
BAM | Bosnia & Herzegovina Convertible Mark |
BBD | Barbadian Dollar |
BDT | Bangladeshi Taka |
BGN | Bulgarian Lev |
BIF | Burundian Franc |
BMD | Bermudian Dollar |
BND | Brunei Dollar |
BOB | Bolivian Boliviano |
BRL | Brazilian Real |
BSD | Bahamian Dollar |
BWP | Botswana Pula |
BZD | Belize Dollar |
CAD | Canadian Dollar |
CDF | Congolese Franc |
CHF | Swiss Franc |
CLP | Chilean Peso |
CNY | Chinese Renminbi Yuan |
COP | Colombian Peso |
CRC | Costa Rican Colón |
CVE | Cape Verdean Escudo |
CZK | Czech Koruna |
DJF | Djiboutian Franc |
DKK | Danish Krone |
DOP | Dominican Peso |
DZD | Algerian Dinar |
EEK | Estonian Kroon |
EGP | Egyptian Pound |
ETB | Ethiopian Birr |
EUR | Euro |
FJD | Fijian Dollar |
FKP | Falkland Islands Pound |
GBP | British Pound |
GEL | Georgian Lari |
GIP | Gibraltar Pound |
GMD | Gambian Dalasi |
GNF | Guinean Franc |
GTQ | Guatemalan Quetzal |
GYD | Guyanese Dollar |
HKD | Hong Kong Dollar |
HNL | Honduran Lempira |
HRK | Croatian Kuna |
HTG | Haitian Gourde |
HUF | Hungarian Forint |
IDR | Indonesian Rupiah |
ILS | Israeli New Sheqel |
INR | Indian Rupee |
ISK | Icelandic Króna |
JMD | Jamaican Dollar |
JPY | Japanese Yen |
KES | Kenyan Shilling |
KGS | Kyrgyzstani Som |
KHR | Cambodian Riel |
KMF | Comorian Franc |
KRW | South Korean Won |
KYD | Cayman Islands Dollar |
KZT | Kazakhstani Tenge |
LAK | Lao Kip |
LBP | Lebanese Pound |
LKR | Sri Lankan Rupee |
LRD | Liberian Dollar |
LSL | Lesotho Loti |
LTL | Lithuanian Litas |
LVL | Latvian Lats |
MAD | Moroccan Dirham |
MDL | Moldovan Leu |
MGA | Malagasy Ariary |
MKD | Macedonian Denar |
MNT | Mongolian Tögrög |
MOP | Macanese Pataca |
MRO | Mauritanian Ouguiya |
MUR | Mauritian Rupee |
MVR | Maldivian Rufiyaa |
MWK | Malawian Kwacha |
MXN | Mexican Peso |
MYR | Malaysian Ringgit |
MZN | Mozambican Metical |
NAD | Namibian Dollar |
NGN | Nigerian Naira |
NIO | Nicaraguan Córdoba |
NOK | Norwegian Krone |
NPR | Nepalese Rupee |
NZD | New Zealand Dollar |
PAB | Panamanian Balboa |
PEN | Peruvian Nuevo Sol |
PGK | Papua New Guinean Kina |
PHP | Philippine Peso |
PKR | Pakistani Rupee |
PLN | Polish Złoty |
PYG | Paraguayan Guaraní |
QAR | Qatari Riyal |
RON | Romanian Leu |
RSD | Serbian Dinar |
RUB | Russian Ruble |
RWF | Rwandan Franc |
SAR | Saudi Riyal |
SBD | Solomon Islands Dollar |
SCR | Seychellois Rupee |
SEK | Swedish Krona |
SGD | Singapore Dollar |
SHP | Saint Helenian Pound |
SLL | Sierra Leonean Leone |
SOS | Somali Shilling |
SRD | Surinamese Dollar |
STD | São Tomé and Príncipe Dobra |
SVC | Salvadoran Colón |
SZL | Swazi Lilangeni |
THB | Thai Baht |
TJS | Tajikistani Somoni |
TOP | Tongan Paʻanga |
TRY | Turkish Lira |
TTD | Trinidad and Tobago Dollar |
TWD | New Taiwan Dollar |
TZS | Tanzanian Shilling |
UAH | Ukrainian Hryvnia |
UGX | Ugandan Shilling |
USD | United States Dollar |
UYU | Uruguayan Peso |
UZS | Uzbekistani Som |
VND | Vietnamese Đồng |
VUV | Vanuatu Vatu |
WST | Samoan Tala |
XAF | Central African Cfa Franc |
XCD | East Caribbean Dollar |
XOF | West African Cfa Franc |
XPF | Cfp Franc |
YER | Yemeni Rial |
ZAR | South African Rand |
ZMW | Zambian Kwacha |
UnknownCurrency | Unknown Currency |
Instances
Eq Currency Source # | |
Data Currency Source # | |
Defined in Web.Stripe.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Currency -> c Currency # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Currency # toConstr :: Currency -> Constr # dataTypeOf :: Currency -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Currency) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Currency) # gmapT :: (forall b. Data b => b -> b) -> Currency -> Currency # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Currency -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Currency -> r # gmapQ :: (forall d. Data d => d -> u) -> Currency -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Currency -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Currency -> m Currency # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Currency -> m Currency # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Currency -> m Currency # | |
Ord Currency Source # | |
Defined in Web.Stripe.Types | |
Read Currency Source # | |
Show Currency Source # | |
FromJSON Currency Source # |
|
ToStripeParam Currency Source # | |
Defined in Web.Stripe.StripeRequest toStripeParam :: Currency -> [(ByteString, ByteString)] -> [(ByteString, ByteString)] Source # | |
StripeHasParam CreateCoupon Currency Source # | |
Defined in Web.Stripe.Coupon | |
StripeHasParam GetBalanceTransactionHistory Currency Source # | |
Defined in Web.Stripe.Balance |
Instances
Eq Date Source # | |
Data Date Source # | |
Defined in Web.Stripe.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Date -> c Date # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Date # dataTypeOf :: Date -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Date) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Date) # gmapT :: (forall b. Data b => b -> b) -> Date -> Date # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Date -> r # gmapQ :: (forall d. Data d => d -> u) -> Date -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Date -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Date -> m Date # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Date -> m Date # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Date -> m Date # | |
Ord Date Source # | |
Read Date Source # | |
Show Date Source # | |
ToStripeParam Date Source # | |
Defined in Web.Stripe.StripeRequest toStripeParam :: Date -> [(ByteString, ByteString)] -> [(ByteString, ByteString)] Source # | |
StripeHasParam GetTransfers Date Source # | |
Defined in Web.Stripe.Transfer |
newtype Description Source #
Generic Description for use in constructing API Calls
Instances
newtype EndingBefore a Source #
Pagination Option for StripeList
Instances
newtype ExpandParams Source #
Type of Expansion Parameters for use on Stripe
objects
Instances
Recipient Object
Instances
Eq Recipient Source # | |
Data Recipient Source # | |
Defined in Web.Stripe.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Recipient -> c Recipient # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Recipient # toConstr :: Recipient -> Constr # dataTypeOf :: Recipient -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Recipient) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Recipient) # gmapT :: (forall b. Data b => b -> b) -> Recipient -> Recipient # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Recipient -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Recipient -> r # gmapQ :: (forall d. Data d => d -> u) -> Recipient -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Recipient -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Recipient -> m Recipient # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Recipient -> m Recipient # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Recipient -> m Recipient # | |
Ord Recipient Source # | |
Defined in Web.Stripe.Types | |
Read Recipient Source # | |
Show Recipient Source # | |
FromJSON Recipient Source # | JSON Instance for |
newtype RecipientId Source #
RecipientId
for a Recipient
Instances
newtype StartingAfter a Source #
Pagination Option for StripeList
Instances
newtype StatementDescription Source #
StatementDescription
to be added to a Charge
Instances
data StripeList a Source #
Generic handling of Stripe JSON arrays
Instances
Transfer
Object
Instances
Eq Transfer Source # | |
Data Transfer Source # | |
Defined in Web.Stripe.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Transfer -> c Transfer # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Transfer # toConstr :: Transfer -> Constr # dataTypeOf :: Transfer -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Transfer) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Transfer) # gmapT :: (forall b. Data b => b -> b) -> Transfer -> Transfer # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Transfer -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Transfer -> r # gmapQ :: (forall d. Data d => d -> u) -> Transfer -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Transfer -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Transfer -> m Transfer # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Transfer -> m Transfer # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Transfer -> m Transfer # | |
Ord Transfer Source # | |
Defined in Web.Stripe.Types | |
Read Transfer Source # | |
Show Transfer Source # | |
FromJSON Transfer Source # | JSON Instance for |
newtype TransferId Source #
Instances
data TransferStatus Source #
Status of a Transfer
Instances
data TransferType Source #
Type of a Transfer
Instances
Pagination Option for StripeList