#baruco-setup intents
1 messages · Page 1 of 1 (latest)
Happy to hear from you again @foggy ocean
which setup_intent are you using? is it the pending_setup_intent?
Yes
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
do you have some request ids I could look at?
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
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
Yes it did, the customer was created with the payment method
then you won't need a setup intent in that case
because the user already has a method to pay the invoice
So this would be relevant if the card had 3DS confirmation required?
no not really, I don't follow the correlation
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...
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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?
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
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
Does that customer or the subscription has a default payment method set?
In that case, the subscription will automatically use the customer default payment method to pay the next invoice, as mentioned here: https://stripe.com/docs/api/subscriptions/create#create_subscription-default_payment_method
If neither are set, invoices will use the customer’s invoice_settings.default_payment_method
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...
Which test card you used?
4000002760003184
that's normal, that card always requires authentication on each payment regardless of how it's setup
there's only one card that can be used for testing recurring payments not requiring authentication and it's 4000002500003155 https://stripe.com/docs/testing#authentication-and-setup
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"?