#macdev3907_best-practices

1 messages ¡ Page 1 of 1 (latest)

wooden fieldBOT
#

👋 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.

digital wyvern
#

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?

slow wraith
#

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.

digital wyvern
#

How much time is there between when the order is placed and when you ship?

slow wraith
#

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 ^

digital wyvern
#

Those are all valid declines on a Setup Intent except insufficient funds.

#

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).

slow wraith
#

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.

digital wyvern
#

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.

slow wraith
#

So Stripe just creates payment methods that are not valid when creating SetupIntents?

digital wyvern
#

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".

slow wraith
#

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

digital wyvern
#

"Valid" can mean many different things in this context.

#

Yes, a Setup Intent's purpose is to save payment details for later use.

slow wraith
#

Valid as in: Valid card (card number provided), correct CVC, correct expiry

digital wyvern
#

Setup Intents will often, but not always, validate all of that information.

wooden fieldBOT
slow wraith
digital wyvern
#

It's true of all Setup Intents regardless of how they're created.

slow wraith
digital wyvern
#

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.