stripeapi-1.0.0.0: Stripe-Library
Safe HaskellNone
LanguageHaskell2010

StripeAPI.Operations.PostOrdersIdPay

Description

Contains the different functions to run the operation postOrdersIdPay

Synopsis

Documentation

postOrdersIdPay Source #

Arguments

:: forall m. MonadHTTP m 
=> Text

id | Constraints: Maximum length of 5000

-> Maybe PostOrdersIdPayRequestBody

The request body to send

-> StripeT m (Response PostOrdersIdPayResponse)

Monadic computation which returns 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>

data PostOrdersIdPayRequestBody Source #

Defines the object schema located at paths./v1/orders/{id}/pay.POST.requestBody.content.application/x-www-form-urlencoded.schema in the specification.

Constructors

PostOrdersIdPayRequestBody 

Fields

  • postOrdersIdPayRequestBodyApplicationFee :: Maybe Int

    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 Object

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