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
- 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 #
:: RecipientId | The |
-> Amount | |
-> Currency | |
-> StripeRequest CreateTransfer |
Create a Transfer
data GetTransfer Source #
:: TransferId |
|
-> StripeRequest GetTransfer |
Retrieve a Transfer
data UpdateTransfer Source #
:: TransferId | The |
-> StripeRequest UpdateTransfer |
Update a Transfer
data CancelTransfer Source #
:: TransferId | The |
-> StripeRequest CancelTransfer |
Cancel a Transfer
data GetTransfers Source #
getTransfers :: StripeRequest GetTransfers Source #
Retrieve StripeList of Transfers
Types
Amount representing a monetary value. Stripe represents pennies as whole numbers i.e. 100 = $1
newtype BankAccountId Source #
Card
Object
CardId for a Customer
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 |
newtype Description Source #
Generic Description for use in constructing API Calls
newtype EndingBefore a Source #
Pagination Option for StripeList
newtype ExpandParams Source #
Type of Expansion Parameters for use on Stripe
objects
Recipient Object
newtype RecipientId Source #
RecipientId
for a Recipient
newtype StartingAfter a Source #
Pagination Option for StripeList
newtype StatementDescription Source #
StatementDescription
to be added to a Charge
data StripeList a Source #
Generic handling of Stripe JSON arrays
Eq a => Eq (StripeList a) Source # | |
Data a => Data (StripeList a) Source # | |
Ord a => Ord (StripeList a) Source # | |
Read a => Read (StripeList a) Source # | |
Show a => Show (StripeList a) Source # | |
FromJSON a => FromJSON (StripeList a) Source # | JSON Instance for |
Transfer
Object
newtype TransferId Source #
data TransferStatus Source #
Status of a Transfer
data TransferType Source #
Type of a Transfer
Eq TransferType Source # | |
Data TransferType Source # | |
Ord TransferType Source # | |
Read TransferType Source # | |
Show TransferType Source # | |
FromJSON TransferType Source # | JSON Instance for |
Pagination Option for StripeList