Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains the different functions to run the operation postPaymentMethodsPaymentMethodAttach
Synopsis
- postPaymentMethodsPaymentMethodAttach :: forall m. MonadHTTP m => Text -> PostPaymentMethodsPaymentMethodAttachRequestBody -> ClientT m (Response PostPaymentMethodsPaymentMethodAttachResponse)
- data PostPaymentMethodsPaymentMethodAttachRequestBody = PostPaymentMethodsPaymentMethodAttachRequestBody {}
- mkPostPaymentMethodsPaymentMethodAttachRequestBody :: Text -> PostPaymentMethodsPaymentMethodAttachRequestBody
- data PostPaymentMethodsPaymentMethodAttachResponse
Documentation
postPaymentMethodsPaymentMethodAttach Source #
:: forall m. MonadHTTP m | |
=> Text | payment_method | Constraints: Maximum length of 5000 |
-> PostPaymentMethodsPaymentMethodAttachRequestBody | The request body to send |
-> ClientT m (Response PostPaymentMethodsPaymentMethodAttachResponse) | Monadic computation which returns the result of the operation |
POST /v1/payment_methods/{payment_method}/attach
<p>Attaches a PaymentMethod object to a Customer.</p>
<p>To attach a new PaymentMethod to a customer for future payments, we recommend you use a <a href="/docs/api/setup_intents">SetupIntent</a> or a PaymentIntent with <a href="/docs/api/payment_intents/create#create_payment_intent-setup_future_usage">setup_future_usage</a>. These approaches will perform any necessary steps to ensure that the PaymentMethod can be used in a future payment. Using the <code>/v1/payment_methods/:id/attach</code> endpoint does not ensure that future payments can be made with the attached PaymentMethod. See <a href="/docs/payments/payment-intents#future-usage">Optimizing cards for future payments</a> for more information about setting up future payments.</p>
<p>To use this PaymentMethod as the default for invoice or subscription payments, set <a href="/docs/api/customers/update#update_customer-invoice_settings-default_payment_method"><code>invoice_settings.default_payment_method</code></a>, on the Customer to the PaymentMethod’s ID.</p>
data PostPaymentMethodsPaymentMethodAttachRequestBody Source #
Defines the object schema located at paths./v1/payment_methods/{payment_method}/attach.POST.requestBody.content.application/x-www-form-urlencoded.schema
in the specification.
PostPaymentMethodsPaymentMethodAttachRequestBody | |
|
Instances
mkPostPaymentMethodsPaymentMethodAttachRequestBody Source #
Create a new PostPaymentMethodsPaymentMethodAttachRequestBody
with all required fields.
data PostPaymentMethodsPaymentMethodAttachResponse Source #
Represents a response of the operation postPaymentMethodsPaymentMethodAttach
.
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), PostPaymentMethodsPaymentMethodAttachResponseError
is used.
PostPaymentMethodsPaymentMethodAttachResponseError String | Means either no matching case available or a parse error |
PostPaymentMethodsPaymentMethodAttachResponse200 PaymentMethod | Successful response. |
PostPaymentMethodsPaymentMethodAttachResponseDefault Error | Error response. |