stripeapi-2.0.0.1: Stripe-Library
Safe HaskellNone
LanguageHaskell2010

StripeAPI.Operations.PostCharges

Description

Contains the different functions to run the operation postCharges

Synopsis

Documentation

postCharges Source #

Arguments

:: forall m. MonadHTTP m 
=> Maybe PostChargesRequestBody

The request body to send

-> ClientT m (Response PostChargesResponse)

Monadic computation which returns the result of the operation

POST /v1/charges

<p>To charge a credit card or other payment source, you create a <code>Charge</code> object. If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).</p>

data PostChargesRequestBody Source #

Defines the object schema located at paths./v1/charges.POST.requestBody.content.application/x-www-form-urlencoded.schema in the specification.

Constructors

PostChargesRequestBody 

Fields

data PostChargesRequestBodyCard'OneOf1 Source #

Defines the object schema located at paths./v1/charges.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.card.anyOf in the specification.

Constructors

PostChargesRequestBodyCard'OneOf1 

Fields

data PostChargesRequestBodyCard'OneOf1Object' Source #

Defines the enum schema located at paths./v1/charges.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.card.anyOf.properties.object in the specification.

Constructors

PostChargesRequestBodyCard'OneOf1Object'Other Value

This case is used if the value encountered during decoding does not match any of the provided cases in the specification.

PostChargesRequestBodyCard'OneOf1Object'Typed Text

This constructor can be used to send values to the server which are not present in the specification yet.

PostChargesRequestBodyCard'OneOf1Object'EnumCard

Represents the JSON value "card"

data PostChargesRequestBodyCard'Variants Source #

Defines the oneOf schema located at paths./v1/charges.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.card.anyOf in the specification.

A token, like the ones returned by Stripe.js.

data PostChargesRequestBodyDestination'OneOf1 Source #

Defines the object schema located at paths./v1/charges.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.destination.anyOf in the specification.

data PostChargesRequestBodyDestination'Variants Source #

Defines the oneOf schema located at paths./v1/charges.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.destination.anyOf in the specification.

data PostChargesRequestBodyMetadata'Variants Source #

Defines the oneOf schema located at paths./v1/charges.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.metadata.anyOf in the specification.

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 PostChargesRequestBodyShipping' Source #

Defines the object schema located at paths./v1/charges.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.shipping in the specification.

Shipping information for the charge. Helps prevent fraud on charges for physical goods.

Constructors

PostChargesRequestBodyShipping' 

Fields

data PostChargesRequestBodyShipping'Address' Source #

Defines the object schema located at paths./v1/charges.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.shipping.properties.address in the specification.

Constructors

PostChargesRequestBodyShipping'Address' 

Fields

data PostChargesRequestBodyTransferData' Source #

Defines the object schema located at paths./v1/charges.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.transfer_data in the specification.

An optional dictionary including the account to automatically transfer to as part of a destination charge. See the Connect documentation for details.

data PostChargesResponse Source #

Represents a response of the operation postCharges.

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), PostChargesResponseError is used.

Constructors

PostChargesResponseError String

Means either no matching case available or a parse error

PostChargesResponse200 Charge

Successful response.

PostChargesResponseDefault Error

Error response.