#macdev3907_best-practices
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1331328999485603903
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello!
Do SetupIntents decline payments the same as PaymentIntents?
Setup Intents do not involve a payment, so no?
For instance, would a SetupIntent verify CVC while attempting to create the intent just as PaymentIntent would?
Sometimes, but not always.
Do they both perform the same verification (sufficient funds, correct cvc, name... etc)?
No. Setup Intents are for saving payment info for future use without a payment. Payment Intents are for actual payments. Thus, the verification process is different. For example, there's no way for a Setup Intent to fail due to insufficient funds because there are no funds required for a Setup Intent.
I would like to know how confident I can be while saving payment method details (via SetupIntents) to be charged later (via PaymentIntents).
That depends on what you mean by "confident". Can you explain your situation and goals in more detail?
I want to save payment method details after a user has placed an order. Before the order ships, I would like to charge the payment method they have provided.
How much time is there between when the order is placed and when you ship?
It could be a few days to a week max
Interesting, I provided these error codes while creating SetupIntents and they return the error as expected (like verification). So you are saying that isn't the case in prod?
This was in dev env ^
Those are all valid declines on a Setup Intent except insufficient funds.
It sounds like you might want to place a hold on the funds for your use case: https://docs.stripe.com/payments/place-a-hold-on-a-payment-method
Note that, short of placing a hold or performing an actual transaction, nothing wil guarantee a future payment will succeed. There are many things that can prevent a card from working at any moment. For example, you might use a Setup Intent to set up a good card with a huge available balance today, but if it's reported stolen or lost tomorrow it won't work tomorrow. Likewise the balance can change at any time, etc. The only way to know for sure if a transaction will go through is to perform that transaction (such as placing a hold).
I've explored this route (authorizing funds to hold) but we've decided to go with SetupIntents (to not hold funds for better CX). Now we are wondering to what extent SetupIntent would verifiy a user's card. So looks like it pretty much verifies all of the error code's I've shared but not "insufficient funds"? Which makes sense bc we won't place a hold.
No, it doesn't always verify everything.
Again, the only way to know for sure if a transaction is going to work is to attempt that transaction.
If a Setup Intent succeeds that means you've successfully saved the Payment Method and can use it in the future.
So Stripe just creates payment methods that are not valid when creating SetupIntents?
It does't mean using it will succeed, it just means it's saved and can be used for transaction attempts.
Each transaction may or may not succeed depending on the state of things at that point in time.
Regarding your question, I don't know what you mean by "valid".
What is the purpose of SetupIntents? To save payment methods and be charged later? Sorry trying to make sure I have clear understanding of its intention
"Valid" can mean many different things in this context.
Yes, a Setup Intent's purpose is to save payment details for later use.
We have a description of Setup Intents here: https://docs.stripe.com/api/setup_intents
Valid as in: Valid card (card number provided), correct CVC, correct expiry
Setup Intents will often, but not always, validate all of that information.
Is this true with creating SetupIntents with the SDK?
https://docs.stripe.com/js/setup_intents/payment_method
It's true of all Setup Intents regardless of how they're created.
Is this because each bank may vary?
It's because payment methods vary, banks vary, and a host of other factors.
The bottom line is this: if you want to save payment details for future use without placing a hold, using a Setup Intent is the correct approach. A successful Setup Intent means you saved the payment details successfully, meaning you can attempt to use those payment details for transactions in the future. A Setup Intent does not and cannot guarantee any future transaction will succeed, though. Each transaction may succeed or fail for a variety of reasons, and there's no way to know what will happen ahead of time.