stripeapi-1.0.0.0: Stripe-Library
Safe HaskellNone
LanguageHaskell2010

StripeAPI.Operations.PostInvoicesInvoicePay

Description

Contains the different functions to run the operation postInvoicesInvoicePay

Synopsis

Documentation

postInvoicesInvoicePay Source #

Arguments

:: forall m. MonadHTTP m 
=> Text

invoice | Constraints: Maximum length of 5000

-> Maybe PostInvoicesInvoicePayRequestBody

The request body to send

-> StripeT m (Response PostInvoicesInvoicePayResponse)

Monadic computation which returns the result of the operation

POST /v1/invoices/{invoice}/pay

<p>Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your <a href="https://dashboard.stripe.com/account/billing/automatic">subscriptions settings</a>. However, if you’d like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so.</p>

data PostInvoicesInvoicePayRequestBody Source #

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

Constructors

PostInvoicesInvoicePayRequestBody 

Fields

  • postInvoicesInvoicePayRequestBodyExpand :: Maybe [Text]

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

  • postInvoicesInvoicePayRequestBodyForgive :: Maybe Bool

    forgive: In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due.

    Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`.

  • postInvoicesInvoicePayRequestBodyOffSession :: Maybe Bool

    off_session: Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session).

  • postInvoicesInvoicePayRequestBodyPaidOutOfBand :: Maybe Bool

    paid_out_of_band: Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`.

  • postInvoicesInvoicePayRequestBodyPaymentMethod :: Maybe Text

    payment_method: A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid.

    Constraints:

    • Maximum length of 5000
  • postInvoicesInvoicePayRequestBodySource :: Maybe Text

    source: A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid.

    Constraints:

    • Maximum length of 5000

data PostInvoicesInvoicePayResponse Source #

Represents a response of the operation postInvoicesInvoicePay.

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

Constructors

PostInvoicesInvoicePayResponseError String

Means either no matching case available or a parse error

PostInvoicesInvoicePayResponse200 Invoice

Successful response.

PostInvoicesInvoicePayResponseDefault Error

Error response.