#Prabu - Setup Intents

1 messages · Page 1 of 1 (latest)

tribal flax
#

Hello! I have a few questions. First, you mentioned using Setup Intents but also authorizing an amount, but Setup Intents do not involve authorization of an amount or movement of funds. Do you mean Payment Intents?

wild venture
#

Setup Intent I used for future payments. Yes authorised an amount using Payment Intent.

tribal flax
#

Okay, so if you used the test card number 4000008260003178 there's no way to get the funds, as you'll always get an insufficient_funds decline when you try. Can you tell me more about what you're trying to do?

wild venture
#

In my app, I authorised an amount during the time of checkout process. In that time the customer cards are valid , but when I try to capture it. stripe will send an error insufficient_funds right? In this case Should I ask customer to give new card detail ?

tribal flax
#

To clarify, you're using a Payment Intent with capture_method set to manual, right?

wild venture
#

capture_method: 'manual',
confirmation_method: 'manual',

tribal flax
#

Okay, so once you successfully confirm that Payment Intent the funds will be held for 7 days until you capture them. The capture won't fail if the Payment Intent was successfully confirmed and you capture within 7 days.

#

If the customer has insufficient funds confirming the Payment Intent will fail.

wild venture
#

Yes it hold for 7 days. within an 7 day I try to confirming it.

#

so we need to collect new card detail from the customer. In this case Stripe will not help us to settled the authorized amount right ? please confirm

tribal flax
#

so we need to collect new card detail from the customer.
What do you mean? You only need to collect card details once for a single payment with separate authorization and capture.

#

In this case Stripe will not help us to settled the authorized amount right ?
Not sure what this means, can you provide more information?

wild venture
#

I used this method and successfully authorised an amount after the customer entered the valid card number (e.g 4000 0082 6000 3178)
Stripe::PaymentIntent.create({
amount: amount,
currency: 'usd',
payment_method_types: ['card'],
capture_method: 'manual',
confirmation_method: 'manual',
payment_method: payment_method_id,
customer: customer,
description: "order has placed",
application_fee_amount: app_fees
}, stripe_account: stripe_account)

#

after 2 days. when the product is approved , I will trigger the following method.
Stripe.stripe_account = stripe_account
response = Stripe::PaymentIntent.capture(
response_code, { amount_to_capture: capture_amount, application_fee_amount: app_fees }
)
In this time customer is not in online. So this time I will get stripe insufficient fund error right ?

tribal flax
#

Can you give me the ID of that Payment Intent?

#

The main thing I want to check is that you're also confirming the Payment Intent at some point.

#

And that the confirmation is succeeding.

wild venture
#

yes confirm method.
Stripe::PaymentIntent.confirm(stripe_payment_intent_id)

tribal flax
#

Okay, can you share the Payment Intent ID so we can take a look?

wild venture
#

ok give me few minutes

#

pi_3KEHgSEjbda0hgH900zRrj95

narrow cedar
#

👋 I'm just hopping in since @tribal flax has to step away - taking a look now!

wild venture
#

sorry for delay and Thanks for your support

narrow cedar
#

That Payment Intent wasn't successfully confirmed - you made the call to confirm it through a server-side call, but authentication was needed so confirmation was completed and the PI still has a status of requires_action

wild venture
#

but I see this line A request to confirm a PaymentIntent pi_3KEHgSEjbda0hgH900zRrj95 completed

narrow cedar
#

The request was successful, but if you look at the response you can see the status is requires_action which means that additional steps are still needed to complete the whole process - we mention this in our API ref (https://stripe.com/docs/api/payment_intents/confirm)

wild venture
#

noted it , Stripe::PaymentIntent.confirm("pi_3KEHgSEjbda0hgH900zRrj95") - it returns "status": "requires_action". so what should I do to confirm this intent.

#

It's server side action.

narrow cedar
#

Backing up for a minute - what is your goal here? Are you just trying to generate a test case where a manual_capture payment intent has insufficient funds?

wild venture
#

yes

#

test card used 4000008260003178

narrow cedar
#

Then for the purposes of testing I'd recommend using the 4000000000009995 test card. If you use the 4000008260003178 you can't go through the whole flow through server-side commands, since you need to come back on-session to finish authentication

wild venture
#

ok I got it

#

That 3178 test card need to authenticate again for confirm right?

narrow cedar
#

For one-time payments, yes

wild venture
#

ok understood. so the customer will see insufficient funds message before confirm success.

narrow cedar
#

Yes, they will see the insufficient funds message when the charge is authenticated (which happens at confirmation)

wild venture
#

ok got it thank you for your help.