stripeapi-0.1.0.2: Stripe-Library

Safe HaskellNone
LanguageHaskell2010

StripeAPI.Operations.PostOrdersIdPay

Description

Contains the different functions to run the operation postOrdersIdPay

Synopsis

Documentation

postOrdersIdPay Source #

Arguments

:: (MonadHTTP m, SecurityScheme s) 
=> Configuration s

The configuration to use in the request

-> Text

id | Constraints: Maximum length of 5000

-> Maybe PostOrdersIdPayRequestBody

The request body to send

-> m (Either HttpException (Response PostOrdersIdPayResponse))

Monad containing the result of the operation

POST /v1/orders/{id}/pay

<p>Pay an order by providing a <code>source</code> to create a payment.</p>

postOrdersIdPayRaw :: forall m s. (MonadHTTP m, SecurityScheme s) => Configuration s -> Text -> Maybe PostOrdersIdPayRequestBody -> m (Either HttpException (Response ByteString)) Source #

POST /v1/orders/{id}/pay

The same as postOrdersIdPay but returns the raw ByteString

data PostOrdersIdPayRequestBody Source #

Defines the data type for the schema postOrdersIdPayRequestBody

Constructors

PostOrdersIdPayRequestBody 

Fields

  • postOrdersIdPayRequestBodyApplicationFee :: Maybe Integer

    application_fee: A fee in %s that will be applied to the order and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees documentation.

  • postOrdersIdPayRequestBodyCustomer :: Maybe Text

    customer: The ID of an existing customer that will be charged for this order. If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified customer will be charged instead of the one attached to the order.

    Constraints:

    • Maximum length of 5000
  • postOrdersIdPayRequestBodyEmail :: Maybe Text

    email: The email address of the customer placing the order. Required if not previously specified for the order.

    Constraints:

    • Maximum length of 5000
  • postOrdersIdPayRequestBodyExpand :: Maybe ([] Text)

    expand: Specifies which fields in the response should be expanded.

  • postOrdersIdPayRequestBodyMetadata :: Maybe PostOrdersIdPayRequestBodyMetadata'

    metadata: Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.

  • postOrdersIdPayRequestBodySource :: Maybe Text

    source: A Token's or a Source's ID, as returned by Elements. If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified source will be charged intead of the customer attached to the order.

    Constraints:

    • Maximum length of 5000

data PostOrdersIdPayRequestBodyMetadata' Source #

Defines the data type for the schema postOrdersIdPayRequestBodyMetadata'

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.

data PostOrdersIdPayResponse Source #

Represents a response of the operation postOrdersIdPay.

The response constructor is chosen by the status code of the response. If no case matches (no specific case for the response code, no range case, no default case), PostOrdersIdPayResponseError is used.

Constructors

PostOrdersIdPayResponseError String

Means either no matching case available or a parse error

PostOrdersIdPayResponse200 Order

Successful response.

PostOrdersIdPayResponseDefault Error

Error response.