stripeapi-1.0.0.0: Stripe-Library
Safe HaskellNone
LanguageHaskell2010

StripeAPI.Operations.PostChargesChargeRefund

Description

Contains the different functions to run the operation postChargesChargeRefund

Synopsis

Documentation

postChargesChargeRefund Source #

Arguments

:: forall m. MonadHTTP m 
=> Text

charge | Constraints: Maximum length of 5000

-> Maybe PostChargesChargeRefundRequestBody

The request body to send

-> StripeT m (Response PostChargesChargeRefundResponse)

Monadic computation which returns the result of the operation

POST /v1/charges/{charge}/refund

<p>When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it.</p>

<p>Creating a new refund will refund a charge that has previously been created but not yet refunded. Funds will be refunded to the credit or debit card that was originally charged.</p>

<p>You can optionally refund only part of a charge. You can do so multiple times, until the entire charge has been refunded.</p>

<p>Once entirely refunded, a charge can’t be refunded again. This method will raise an error when called on an already-refunded charge, or when trying to refund more money than is left on a charge.</p>

data PostChargesChargeRefundRequestBody Source #

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

Constructors

PostChargesChargeRefundRequestBody 

Fields

data PostChargesChargeRefundRequestBodyMetadata'Variants Source #

Defines the oneOf schema located at paths./v1/charges/{charge}/refund.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`.

Instances

Instances details
Eq PostChargesChargeRefundRequestBodyMetadata'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostChargesChargeRefund

Show PostChargesChargeRefundRequestBodyMetadata'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostChargesChargeRefund

ToJSON PostChargesChargeRefundRequestBodyMetadata'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostChargesChargeRefund

FromJSON PostChargesChargeRefundRequestBodyMetadata'Variants Source # 
Instance details

Defined in StripeAPI.Operations.PostChargesChargeRefund

data PostChargesChargeRefundRequestBodyReason' Source #

Defines the enum schema located at paths./v1/charges/{charge}/refund.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.reason in the specification.

Constructors

PostChargesChargeRefundRequestBodyReason'Other Value

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

PostChargesChargeRefundRequestBodyReason'Typed Text

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

PostChargesChargeRefundRequestBodyReason'EnumDuplicate

Represents the JSON value "duplicate"

PostChargesChargeRefundRequestBodyReason'EnumFraudulent

Represents the JSON value "fraudulent"

PostChargesChargeRefundRequestBodyReason'EnumRequestedByCustomer

Represents the JSON value "requested_by_customer"

data PostChargesChargeRefundResponse Source #

Represents a response of the operation postChargesChargeRefund.

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

Constructors

PostChargesChargeRefundResponseError String

Means either no matching case available or a parse error

PostChargesChargeRefundResponse200 Charge

Successful response.

PostChargesChargeRefundResponseDefault Error

Error response.