Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- paymentsPath :: Text
- newPayment :: Double -> Text -> Text -> NewPayment
- newRecurringPayment :: Double -> Text -> NewPayment
- createPayment :: NewPayment -> Mollie (Either ResponseError Payment)
- getPayment :: Text -> Mollie (Either ResponseError Payment)
- getPayments :: Int -> Int -> Mollie (Either ResponseError (List Payment))
- newRefund :: NewRefund
- createPaymentRefund :: Text -> NewRefund -> Mollie (Either ResponseError Refund)
- getPaymentRefund :: Text -> Text -> Mollie (Either ResponseError Refund)
- cancelPaymentRefund :: Text -> Text -> Mollie (Maybe ResponseError)
- getPaymentRefunds :: Text -> Int -> Int -> Mollie (Either ResponseError (List Refund))
- data PaymentStatus
- data PaymentMethod
- data RecurringType
- data NewPayment = NewPayment {
- newPayment_amount :: Double
- newPayment_description :: Text
- newPayment_redirectUrl :: Maybe Text
- newPayment_webhookUrl :: Maybe Text
- newPayment_method :: Maybe PaymentMethod
- newPayment_metadata :: Maybe Value
- newPayment_locale :: Maybe Text
- newPayment_recurringType :: Maybe RecurringType
- newPayment_customerId :: Maybe Text
- newPayment_issuer :: Maybe Text
- newPayment_billingAddress :: Maybe Text
- newPayment_billingCity :: Maybe Text
- newPayment_billingRegion :: Maybe Text
- newPayment_billingPostal :: Maybe Text
- newPayment_billingCountry :: Maybe Text
- newPayment_shippingAddress :: Maybe Text
- newPayment_shippingCity :: Maybe Text
- newPayment_shippingRegion :: Maybe Text
- newPayment_shippingPostal :: Maybe Text
- newPayment_shippingCountry :: Maybe Text
- newPayment_billingEmail :: Maybe Text
- newPayment_dueDate :: Maybe Text
- newPayment_consumerName :: Maybe Text
- newPayment_consumerAccount :: Maybe Text
- newPayment_customerReference :: Maybe Text
- data Mode
- data PaymentLinks = PaymentLinks {}
- data Payment = Payment {
- payment_id :: Text
- payment_mode :: Mode
- payment_createdDatetime :: UTCTime
- payment_status :: PaymentStatus
- payment_paidDatetime :: Maybe UTCTime
- payment_cancelledDatetime :: Maybe UTCTime
- payment_expiredDatetime :: Maybe UTCTime
- payment_expiryPeriod :: Maybe Text
- payment_amount :: Text
- payment_amountRefunded :: Maybe Text
- payment_amountRemaining :: Maybe Text
- payment_description :: Text
- payment_method :: Maybe PaymentMethod
- payment_metadata :: Maybe Value
- payment_locale :: Maybe Text
- payment_profileId :: Text
- payment_customerId :: Maybe Text
- payment_mandateId :: Maybe Text
- payment_settlementId :: Maybe Text
- payment_links :: PaymentLinks
- payment_details :: Maybe Object
- data ListLinks = ListLinks {}
- data List a = List {
- list_totalCount :: Int
- list_offset :: Int
- list_count :: Int
- list_data :: [a]
- list_links :: Maybe ListLinks
- data NewRefund = NewRefund {}
- data RefundStatus
- data Refund = Refund {}
- data ResponseError
Documentation
paymentsPath :: Text Source #
Payment resource's path, relative to API's versioned url or to a customer resource url.
:: Double | amount |
-> Text | description |
-> Text | redirectUrl |
-> NewPayment |
Helper to create a minimal new payment for normal use.
:: Double | amount |
-> Text | description |
-> NewPayment |
Helper to create a minimal new payment for recurring use.
A payment created with this helper should be sent with the
createCustomerPayment
from Customers
or have
the customerId set.
For a first recurring payment use newPayment
and set the
recurring type to RecurringType
, because it needs a return url.
createPayment :: NewPayment -> Mollie (Either ResponseError Payment) Source #
Handler to create a new payment.
For more information see: https://www.mollie.com/en/docs/reference/payments/create.
:: Text | paymentId |
-> Mollie (Either ResponseError Payment) |
Handler to get a payment by its identifier.
For more information see: https://www.mollie.com/en/docs/reference/payments/get.
Handler to get a list of payment. Because the list endpoint is paginated this handler requires an offset and a count. The maximum amount of payments returned with a single call is 250.
For more information see: https://www.mollie.com/en/docs/reference/payments/list.
newRefund :: NewRefund Source #
Helper to create a minimal new refund. Defaults to refunding the total amount for the targetted payment.
Handler to create a new refund for a specific payment.
For more information see: https://www.mollie.com/en/docs/reference/refunds/create.
Handler to get a refund by its identifier for a specific payment.
For more information see: https://www.mollie.com/en/docs/reference/refunds/get.
:: Text | paymentId |
-> Text | refundId |
-> Mollie (Maybe ResponseError) |
Handler to cancel a refund by its identifier for a specific payment.
This request only works on refunds which have not yet started processing.
For more information see: https://www.mollie.com/en/docs/reference/refunds/delete.
Handler to get a list of refunds for a specific payment. Because the list endpoint is paginated this handler requires an offset and a count. The maximum amount of refunds returned with a single call is 250.
For more information see: https://www.mollie.com/en/docs/reference/refunds/list.
data PaymentStatus Source #
All possible statusses which can be assigned to a payment. When an important status changes occurs Mollie will notify the application by requesting the configured Webhook. Note that some changes will never be known to the application.
For more information see: https://www.mollie.com/en/docs/status.
PaymentOpen | Payment has been created. This is the initial status. |
PaymentCancelled | Customer has cancelled the payment. |
PaymentPending | The payment process has been started. No notification. |
PaymentExpired | The payment has expired. Some payment methods (like |
PaymentFailed | The payment can't be completed. |
PaymentPaid | The payment was successful. This is the success status. |
PaymentPaidout | Mollie has transfered the payment to your bankaccount. No notification. |
PaymentRefunded | You requested a refund for the payment. |
PaymentChargedBack | The customer dispute the payment. This is possible with |
Instances
Eq PaymentStatus Source # | |
Defined in Mollie.API.Types (==) :: PaymentStatus -> PaymentStatus -> Bool # (/=) :: PaymentStatus -> PaymentStatus -> Bool # | |
Read PaymentStatus Source # | |
Defined in Mollie.API.Types readsPrec :: Int -> ReadS PaymentStatus # readList :: ReadS [PaymentStatus] # | |
Show PaymentStatus Source # | |
Defined in Mollie.API.Types showsPrec :: Int -> PaymentStatus -> ShowS # show :: PaymentStatus -> String # showList :: [PaymentStatus] -> ShowS # | |
FromJSON PaymentStatus Source # | |
Defined in Mollie.API.Types parseJSON :: Value -> Parser PaymentStatus # parseJSONList :: Value -> Parser [PaymentStatus] # | |
ToText PaymentStatus Source # | |
Defined in Mollie.API.Types toText :: PaymentStatus -> Text Source # |
data PaymentMethod Source #
All possible payment methods.
Ideal | |
Creditcard | |
Mistercard | |
Sofort | |
Banktransfer | |
Directdebit | |
Belfius | |
Paypal | |
Bitcoin | |
Podiumcadeaukaart | |
Paysafecard | |
NewPaymentMethod Text |
Instances
Eq PaymentMethod Source # | |
Defined in Mollie.API.Types (==) :: PaymentMethod -> PaymentMethod -> Bool # (/=) :: PaymentMethod -> PaymentMethod -> Bool # | |
Read PaymentMethod Source # | |
Defined in Mollie.API.Types readsPrec :: Int -> ReadS PaymentMethod # readList :: ReadS [PaymentMethod] # | |
Show PaymentMethod Source # | |
Defined in Mollie.API.Types showsPrec :: Int -> PaymentMethod -> ShowS # show :: PaymentMethod -> String # showList :: [PaymentMethod] -> ShowS # | |
ToJSON PaymentMethod Source # | |
Defined in Mollie.API.Types toJSON :: PaymentMethod -> Value # toEncoding :: PaymentMethod -> Encoding # toJSONList :: [PaymentMethod] -> Value # toEncodingList :: [PaymentMethod] -> Encoding # | |
FromJSON PaymentMethod Source # | |
Defined in Mollie.API.Types parseJSON :: Value -> Parser PaymentMethod # parseJSONList :: Value -> Parser [PaymentMethod] # | |
ToText PaymentMethod Source # | |
Defined in Mollie.API.Types toText :: PaymentMethod -> Text Source # |
data RecurringType Source #
All available recurring types.
Instances
Eq RecurringType Source # | |
Defined in Mollie.API.Types (==) :: RecurringType -> RecurringType -> Bool # (/=) :: RecurringType -> RecurringType -> Bool # | |
Read RecurringType Source # | |
Defined in Mollie.API.Types readsPrec :: Int -> ReadS RecurringType # readList :: ReadS [RecurringType] # | |
Show RecurringType Source # | |
Defined in Mollie.API.Types showsPrec :: Int -> RecurringType -> ShowS # show :: RecurringType -> String # showList :: [RecurringType] -> ShowS # | |
ToJSON RecurringType Source # | |
Defined in Mollie.API.Types toJSON :: RecurringType -> Value # toEncoding :: RecurringType -> Encoding # toJSONList :: [RecurringType] -> Value # toEncodingList :: [RecurringType] -> Encoding # | |
FromJSON RecurringType Source # | |
Defined in Mollie.API.Types parseJSON :: Value -> Parser RecurringType # parseJSONList :: Value -> Parser [RecurringType] # | |
ToText RecurringType Source # | |
Defined in Mollie.API.Types toText :: RecurringType -> Text Source # |
data NewPayment Source #
Structure to request a new payment with.
For more information see: https://www.mollie.com/en/docs/reference/payments/create.
NewPayment | |
|
Instances
Show NewPayment Source # | |
Defined in Mollie.API.Types showsPrec :: Int -> NewPayment -> ShowS # show :: NewPayment -> String # showList :: [NewPayment] -> ShowS # | |
ToJSON NewPayment Source # | |
Defined in Mollie.API.Types toJSON :: NewPayment -> Value # toEncoding :: NewPayment -> Encoding # toJSONList :: [NewPayment] -> Value # toEncodingList :: [NewPayment] -> Encoding # |
All available API modes.
data PaymentLinks Source #
Important links used for a payment.
PaymentLinks | |
|
Instances
Show PaymentLinks Source # | |
Defined in Mollie.API.Types showsPrec :: Int -> PaymentLinks -> ShowS # show :: PaymentLinks -> String # showList :: [PaymentLinks] -> ShowS # | |
FromJSON PaymentLinks Source # | |
Defined in Mollie.API.Types parseJSON :: Value -> Parser PaymentLinks # parseJSONList :: Value -> Parser [PaymentLinks] # |
Representation of a payment made with Mollie.
Note that the amounts are curently returned as text because Mollie does not return them as valid json numbers.
For more information see: https://www.mollie.com/nl/docs/reference/payments/get.
Payment | |
|
Important links associated with List responses.
ListLinks | |
|
List response for any resource with metadata.
For more information see: https://www.mollie.com/nl/docs/reference/payments/list.
List | |
|
Structure to request a refund.
For more information see: https://www.mollie.com/en/docs/reference/refunds/create.
NewRefund | |
|
data RefundStatus Source #
All possible statusses a refund could be assigned.
For more information see: https://www.mollie.com/en/docs/reference/refunds/get.
RefundPending | The payment will be processed soon (usually the next business day). The refund could still be cancelled, see: https://www.mollie.com/en/docs/reference/refunds/delete. |
RefundProcessing | The refund is processing, cancellation is no longer possible. |
RefundRefunded | The refund has been paid out the the customer. |
Instances
Eq RefundStatus Source # | |
Defined in Mollie.API.Types (==) :: RefundStatus -> RefundStatus -> Bool # (/=) :: RefundStatus -> RefundStatus -> Bool # | |
Read RefundStatus Source # | |
Defined in Mollie.API.Types readsPrec :: Int -> ReadS RefundStatus # readList :: ReadS [RefundStatus] # | |
Show RefundStatus Source # | |
Defined in Mollie.API.Types showsPrec :: Int -> RefundStatus -> ShowS # show :: RefundStatus -> String # showList :: [RefundStatus] -> ShowS # | |
FromJSON RefundStatus Source # | |
Defined in Mollie.API.Types parseJSON :: Value -> Parser RefundStatus # parseJSONList :: Value -> Parser [RefundStatus] # | |
ToText RefundStatus Source # | |
Defined in Mollie.API.Types toText :: RefundStatus -> Text Source # |
Representation of a refund made with Mollie.
Note that the amount is curently returned as text because Mollie does not return it as a valid json number.
For more information see: https://www.mollie.com/en/docs/reference/refunds/get.
Refund | |
|
data ResponseError Source #
Response errors which could happen when requesting resources from Mollie.
Instances
Show ResponseError Source # | |
Defined in Mollie.API.Types showsPrec :: Int -> ResponseError -> ShowS # show :: ResponseError -> String # showList :: [ResponseError] -> ShowS # |