mollie-api-haskell-0.1.0.0: Mollie API client for Haskell http://www.mollie.com

Safe HaskellNone
LanguageHaskell2010

Mollie.API.Payments

Synopsis

Documentation

paymentsPath :: Text Source #

Payment resource's path, relative to API's versioned url or to a customer resource url.

newPayment :: Double -> Text -> Text -> NewPayment Source #

Helper to create a minimal new payment for normal use.

newRecurringPayment :: Double -> Text -> NewPayment Source #

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 First, because it needs a return url.

getPayment :: Text -> Mollie (Either ResponseError Payment) Source #

Handler to get a payment by its identifier.

For more information see: https://www.mollie.com/en/docs/reference/payments/get.

getPayments :: Int -> Int -> Mollie (Either ResponseError (List Payment)) Source #

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.

createPaymentRefund :: Text -> NewRefund -> Mollie (Either ResponseError Refund) Source #

Handler to create a new refund for a specific payment.

For more information see: https://www.mollie.com/en/docs/reference/refunds/create.

getPaymentRefund :: Text -> Text -> Mollie (Either ResponseError Refund) Source #

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.

cancelPaymentRefund :: Text -> Text -> Mollie (Maybe ResponseError) Source #

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.

getPaymentRefunds :: Text -> Int -> Int -> Mollie (Either ResponseError (List Refund)) Source #

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.

Constructors

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 banktransfer) might need a few days to process.

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 creditcard, directdebit and paypal payments.

data NewPayment Source #

Structure to request a new payment with.

For more information see: https://www.mollie.com/en/docs/reference/payments/create.

Constructors

NewPayment 

Fields

data Mode Source #

All available API modes.

Constructors

Live 
Test 

data PaymentLinks Source #

Important links used for a payment.

Constructors

PaymentLinks 

Fields

data Payment Source #

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.

Constructors

Payment 

Fields

data ListLinks Source #

Important links associated with List responses.

Constructors

ListLinks 

Fields

data List a Source #

List response for any resource with metadata.

For more information see: https://www.mollie.com/nl/docs/reference/payments/list.

Constructors

List 

Fields

Instances

Show a => Show (List a) Source # 

Methods

showsPrec :: Int -> List a -> ShowS #

show :: List a -> String #

showList :: [List a] -> ShowS #

FromJSON a0 => FromJSON (List a0) Source # 

Methods

parseJSON :: Value -> Parser (List a0) #

data NewRefund Source #

Structure to request a refund.

For more information see: https://www.mollie.com/en/docs/reference/refunds/create.

Constructors

NewRefund 

Fields

data RefundStatus Source #

All possible statusses a refund could be assigned.

For more information see: https://www.mollie.com/en/docs/reference/refunds/get.

Constructors

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.

data Refund 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.

Constructors

Refund 

Fields

data ResponseError Source #

Response errors which could happen when requesting resources from Mollie.