#Wasabi - Setup and Payment Intents
1 messages · Page 1 of 1 (latest)
Hello!
Setup Intents are used to set up Payment Methods for future use without taking a payment. Payment Intents are used to collect a payment, and can optionally also be used to set up a Payment Method for future use at the same time.
Both Setup Intents and Payment Intents work with Payment Methods.
Does that help? Happy to answer more questions if you have them!
@autumn tulip thank you for the quick reply. Still trying to figure out the feasibility and tradeoff for a user on this scenario.
Create a new payment method with POST 'https://api.stripe.com/v1/payment_methods'
Attach the payment method to the customer with POST 'https://api.stripe.com/v1/payment_methods/pm_1JxDtKJyGVgKQ3vzsnTnxMGy/attach'
Update the invoice_settings[default_payment_method] on the customer with POST 'https://api.stripe.com/v1/customers/cus_KTpR0hNAWmQGpw'
Update the default_payment_method on the subscription with POST 'https://api.stripe.com/v1/subscriptions/sub_1Jorn9JyGVgKQ3vz2pvFoOzZ'
I want to account for the scenario where a customer who has an active subscription wants to change the credit card on their subscription so that the next time they are billed (X months from now), their new credit card will be charged.
In steps #1-4 in the question, I am trying to create a brand new payment method (not update an existing one) and set it as the default payment method on both the customer and subscription object. Is this a valid approach for changing the credit card on subscription so that when it’s time to renew the subscription, the user is billed with the new payment method instead of the original one?
Can you clarify why is not recommended?
You should use a Setup Intent to attach the new Payment Method to the Customer to set it up for future use. Directly attaching the Payment Method to the Customer does not set it up for future use.
Does step 3 or 4 help set up for future use on a subscription?
The SA on the user prefers to use PaymentMethod if possible. Their assumption is that it's more consistent for their logics. However, I want to confirm if using PaymentMethod route is feasible, if any risks they need to consider here.
đŸ¤”
There are risks with not using a Setup Intent and directly attaching. The direct attach is more likely to fail. Not using a Setup Intent will mean attempting to charge the Payment Method later is more likely to fail.
You should absolutely not be directly attaching Payment Methods to Customers, you should always use a Setup Intent or Payment Intent.
I want to make sure I provide a rationale here. Why is it more likely to fail?
Because you're not setting it up for future use with a Setup Intent or Payment Intent. Sorry, I think we're talking in circles. Can you ask a more specific question? Does this page help? https://stripe.com/docs/payments/setup-intents
The goal is to have payment credentials saved and optimized for future payments, meaning the payment method is configured correctly for any scenario. When setting up a card, for example, it may be necessary to authenticate the customer or check the card’s validity with the customer’s bank. Stripe updates the
SetupIntentobject throughout that process.
Thank you!! I think this answered the why not to use payment method. They can but the risk is clear here.