#baruco-setup intents

1 messages · Page 1 of 1 (latest)

foggy ocean
#

đź‘‹ happy to help

novel crystal
#

Happy to hear from you again @foggy ocean

foggy ocean
#

which setup_intent are you using? is it the pending_setup_intent?

novel crystal
#

Yes

foggy ocean
#

how are you confirming the setup intent?

#

is it from the Elements on your front-end?

novel crystal
#

Usually in a regular flow - yes.
But now I'm running a test using only the GO SDK

#

So basically running a POST https://api.stripe.com/v1/setup_intents/<id>/confirm

#

With the payment method ID

foggy ocean
#

do you have some request ids I could look at?

novel crystal
#

Would a test clock ID help? You'll have everything from there

#

clock_1LFy4DA155AgO8fT6u2ZTDDF

#

Paid invoice without a "confirmed" payment method - in_1LFy4fA155AgO8fTaeSly0Xm

#

Customer ID - cus_LxtrTC8gHBYoSV

foggy ocean
#

did this customer have a payment method attached before the creation of that subscription?

#

I can see it has already invoice_settings.default_payment_method set on it

#

that might explain why it's already being paid

novel crystal
#

Yes it did, the customer was created with the payment method

foggy ocean
#

then you won't need a setup intent in that case

#

because the user already has a method to pay the invoice

novel crystal
#

So this would be relevant if the card had 3DS confirmation required?

foggy ocean
#

no not really, I don't follow the correlation

novel crystal
#

From the documentation - https://stripe.com/docs/api/setup_intents/confirm?lang=go:

Confirm that your customer intends to set up the current or provided payment method. For example, you would confirm a SetupIntent when a customer hits the “Save” button on a payment method management page on your website.
If the selected payment method does not require any additional steps from the customer, the SetupIntent will transition to the succeeded status.

Otherwise, it will transition to the requires_action status and suggest additional actions via next_action. If setup fails, the SetupIntent will transition to the requires_payment_method status.

I assumed, and also saw it when using the different test cards, that when using a card with 3DS, the "stripe.confirmCardSetup" element pops up a modal for the 3DS confirmation, even after the customer is created with a payment method.
So I figured this is required for 3DS cards...

wispy tiger
#

Hi! I'm taking over this thread.

#

Could you try to summarize your question?

novel crystal
#

I guess it's the same as the one I initiated this thread with...
I'm trying to understand the point of the "setup intent" entry on the "payment method" on a customer, when it has "setup for future use".
Even when this doesn't exist, I am able to bill customers in the future.
@foggy ocean said it's expected because there's a payment method attached to the customer, so I asked what's the point of the "confirm setup intent" if it's not necessary?

foggy ocean
#

there are 2 separate points for that question @novel crystal

#

first for every metered subscription you would have the first invoice that is generated for a zero amount which gets paid automatically

#

regardless whether there is a payment method attached to the subscription and/or the customer

#

for the upcoming invoices it's different

#

so in the case where there's a default payment method setup on the user you might not consider to skip using the pending_setup_intent

#

I will leave you with @wispy tiger

#

if you have any more questions

novel crystal
#

So that's what I meant.
I'm using a test clock with a subscription and a customer.
The customer has a payment method attached and the subscription is usage-based.
I added usage for the subscription item and the next invoice had a 126$.
I advanced the test clock to the end of the billing cycle, and an invoice was successfully paid for 126$.
All without ever confirming the pending_setup_intent

wispy tiger
#

Does that customer or the subscription has a default payment method set?

novel crystal
#

Yes

#

The customer does

wispy tiger
novel crystal
#

I just tested the same flow with a card that required 3DS.
Once without running setupintent.Confirm function of the GO SDK, and another with running it.
In both cases, the invoice payment failed due to 3DS confirmation missing, so what I understand from this is that the confirmCardSetup is to allow 3DS cards confirmation, when there's a payment method attached to the customer...

wispy tiger
#

Which test card you used?

novel crystal
#

4000002760003184

unreal badger
#

that's normal, that card always requires authentication on each payment regardless of how it's setup

novel crystal
#

Ah, I see.
So in the case of using my card - 4000002760003184
For every payment I need to notify the user to come and confirm the "payment"?