Attach a PaymentMethod to a Customer
Changed onAttaches a PaymentMethod object to a Customer.
To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent or a PaymentIntent with setup_future_usage. These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for future use, which makes later declines and payment friction more likely. See Optimizing cards for future payments for more information about setting up future payments.
To use this PaymentMethod as the default for invoice or subscription payments, set invoice_settings.default_payment_method, on the Customer to the PaymentMethod’s ID.
Request
- Base URL: https://api.stripe.com
- URL: https://api.stripe.com/v1/payment_methods/{payment_method}/attach
- Auth: one of:
- HTTP basic
- HTTP bearer
Path parameters
Response
Successful response.
Changes
- breaking
removed the required property
//////////////////from the response with the status - breaking
removed the required property
////////////////from the response with the status - breaking
removed the required property
////////////////from the response with the status - breaking
removed the required property
////////////from the response with the status - breaking
removed the required property
//////////from the response with the status - breaking
removed the required property
//////////from the response with the status - breaking
removed the required property
/////////////from the response with the status - breaking
removed the required property
///////////from the response with the status - breaking
removed the required property
///////////from the response with the status - breaking
removed the required property
//////////////////from the response with the status - breaking
removed the required property
////////////////from the response with the status - breaking
removed the required property
////////////////from the response with the status
This list may be incomplete.
- breaking
Some revisions have not been checked yet.