#BrianC-setupintents

1 messages · Page 1 of 1 (latest)

versed hazel
#

When we say "unconfirmed" we're referring to any SetupIntent that hasn't had /confirm called (see https://stripe.com/docs/api/setup_intents/confirm). We really recommend that you try and confirm the SetupIntent soon after it's been created, but we don't have a specific duration that they're good for. It would probablly be fine for a few hours

deep harbor
#

Thanks, that is helpful. Is it safe to say that the confirm process of a setupintent would be comparable to the process charge step of a payment intent. basically an affirmation?

#

Setup paymentintent >> process chage =. setup SetupIntent >> confirm setupintent?

#

Since we are a crowdfunding platform, we need our setup intents to be good for up to 60 days. A few hours seems quite short. How can we confirm this?

versed hazel
#

"setup intents to be good for up to 60 days" -> Can you explain this a bit more? A Setup Intent is just used for setting up the payment method for future usage. If you need to do it more than a few hours in the future, you could just creeate a new one when it's needed

deep harbor
#

We need to collect card informtion for a charge that will be made 30 - 60 days later.

#

And do any SCA authentication at that time

#

We currently create a customer Id and attach a card token

#

If setupintent is not the correct way, how would we do this? We need to collect card info, do sca auth,etc and be able to charge the card 30-60days later without the card failing due to SCA.

versed hazel
#

In that scenario you're collelcting the card information at the start with the Setup Intent right? Then the Setup Intent has been confirmed and you don't need to worry about it

deep harbor
#

OK. I believe you, but how long is the setup intent good for?

#

"In that scenario you're collelcting the card information at the start with the Setup Intent right? Then the Setup Intent has been confirmed and you don't need to worry about it" - so there is no need to confirm the setup intent as long as we are passing the card info?

soft quest
#

Hello! Stepping in for @versed hazel. Setup Intents themselves are designed to exist just long enough to set up a payment method for future use. The setup that happens lasts "forever" though, meaning you don't need to set the same payment method up again periodically.

#

Generally the steps are:

  1. Collect payment information
  2. Create a Setup Intent to set it up for future use
  3. Confirm the Setup Intent

The payment information is now set up for future use. The Setup Intent itself will not be used again, it only exists to handle the setup process.

deep harbor
#

My apologies, we are getting conflicting information from multiple sources and it's quite confusing. Here is my understanding for our scenario (crowdfunding site - 30/60days we charge the card after collecting)

We create a SetupIntent providing the paymenttupe = card , usage= "off_session"

We collect the card information from the user via StripeElements form

#

We create a paymentintent for future usage

#

Is this the correct scenario?

soft quest
#

Yep, that's basically it! What conflicting info are you getting?

deep harbor
#

We were told to create a setupintent for charging a card in the future and were told not to use a paymentintent for future usage but it seems like a setupintent requires a paymentintent

soft quest
#

A Setup Intent is used when you want to collect and set up payment information for future use without taking an initial payment.

A Payment Intent is used when you want to take payment, and can also be used to set up payment information for future use.

#

If you're not collecting any initial payment you should use a Setup Intent to collect the payment info. If you are, you should use a Payment Intent.

Either way, later on when you want to collect an off-session payment, you would use a Payment Intent.

#

Does that make sense?

deep harbor
#

Makes total sense. That isn't very clear, even in the documentation. But the way you put it is very clear now. From what I understand regarding SCA, setupintent process will trigger SCA auth and as long as we set paymentintent to off_session, the card should authenticate without a recovery process for the customer. however, the bank may reject it anyway and we need a recovery process. Are there any examples of that recovery (ie. webhooks, etc.) you can point us to?

deep harbor
#

Great! Thank you! You saved me a lot of time and headaches. I was on the phone with support for 1 hour and ended up with more questions than answers. You summed it up in 3 min. You deserve a raise... Just sayin

soft quest
#

Glad I could help!

deep harbor
#

One last question, if we create a setupintent and immediately create a paymentintent for future usage with it, do we still need to "confirm" the setupintent or is that inherent once we use it for the paymentintent for future usage.

soft quest
#

Is this for a scenario where you're taking an initial payment at the time the customer is providing their payment information?

deep harbor
#

No, this is for collecting the card information for future use.

#

We would not need a setupintent if we were taking payment immediately, correct?

soft quest
#

Correct. But if you're not taking payment you don't need a Payment Intent.

#

You would create and confirm a Setup Intent when the customer is present to set up their payment information for future use.

Then, later (30/60 days in your case) you would create a Payment Intent to charge them off session.

#

In other words, doing this does not make sense:

if we create a setupintent and immediately create a paymentintent for future usage with it

There's no reason to create a Setup Intent and then immediately create a Payment Intent.

deep harbor
#

OK. Sorry but there is still a bit of confusion on my end. Mostly with the timing. So when creating a SetupIntent, we need to:

  1. Create the intent

var options = new SetupIntentCreateOptions
{
Usage = "off_session",
PaymentMethodTypes = new List<string>
{
"card",
},
};
var service = new SetupIntentService();
var setupIntent = await service.CreateAsync(options);
2. Confirm the intent

var options = new SetupIntentConfirmOptions
{
PaymentMethod = "pm_card_visa", //seems like we already have to have card info created and stored?
};
var service = new SetupIntentService();
service.Confirm(
"seti_1Jc11RHP4bdaosyLoyzkiSxB",
options
);

  1. How do we save the card info without creating a paymentintent for future usage?

My understanding is that we created a SetupIntent in order to create a PaymentIntent and not charge the card immediately but save for a later date.

Also, can you point me to the part of the documentation that shows how to create a paymentintent using this setupintent id?

soft quest
#

Step 2 should be done client-side with Stripe.js to allow for async authentication by the customer.

How do we save the card info without creating a paymentintent for future usage?

You create a Customer object in Stripe and specify that Customer when creating/confirming the Setup Intent. Upon successful confirmation the Payment Method will be attached to the Customer and available for future use by later creating a Payment Intent that specifies that Customer and Payment Method: https://stripe.com/docs/api/setup_intents/create#create_setup_intent-customer

My understanding is that we created a SetupIntent in order to create a PaymentIntent and not charge the card immediately but save for a later date.

The Setup Intent is used to set up the Payment Method for future use and attach it to a Customer. That's all it does.

A Payment Intent is used to collect payment. The Payment Intent should not be created until you're ready to collect payment.

Also, can you point me to the part of the documentation that shows how to create a paymentintent using this setupintent id?

That's not how it works. Once the Setup Intent is confirmed successfully you never use it again for anything. You would specify the Customer and Payment Method to charge when creating the Payment Intent later. The Setup Intent is not involved at that point.

deep harbor
#

OK. So we do need to create a customer for this. That is the missing piece. i received more conflicting info on that as well. The docs seem to imply is optional and we were told that as well. Am I the only one not getting this? LOL. I feel like it is quite complex.

soft quest
#

Customers are technically optional, but if you want to use the Payment Method involved more than once a Customer is required.

#

Have you read through that from top to bottom?

deep harbor
#

But we are not using the payment info more than once. Every transaction will be singleton. It does seem that in order to create and intent and save for later a customer is in fact required. Is this correct?

soft quest
#

You're using it more than once though, once to set it up, once to charge it later.

#

I think that might be the point of confusion; setting it up counts as a use.