HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulestripeapi-3.0.0.0Haskell2010

StripeAPI.Operations.PostInvoicesInvoicePay

Contains the different functions to run the operation postInvoicesInvoicePay

  • 2 types
  • 2 values
  • Packagestripeapi-3.0.0.0
  • Exports4
  • LanguageHaskell2010
  • LicenceMIT
  • SourcePostInvoicesInvoicePay.hs
valuepostInvoicesInvoicePay
  1. :: MonadHTTP m
  2. => Text

    invoice | Constraints: Maximum length of 5000

  3. -> Maybe PostInvoicesInvoicePayRequestBody

    The request body to send

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

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

Instances4Eq, Show, FromJSON, ToJSON

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

Instances2Eq, Show