#brian-subscription-updatepm

1 messages ยท Page 1 of 1 (latest)

karmic flickerBOT
marble warren
#

Hi ๐Ÿ‘‹

Do you have a request ID for the API request that shows this error?

daring tartan
#

no request id, but have a customer id

marble warren
#

What about the Payment Intent ID? This is more related to the API calls for the Payment Intent

daring tartan
#

pi_3Nol9IIvcqWR3dFD1Yp8qa9D

marble warren
#

Thanks, taking a look

daring tartan
#

We don't pass in a payment intent when creating the setup intent though, we crete the setup intent and link it to the customer after we handle the return_url

#

I get "No request log found with the specified ID."

marble warren
#

I'm sorry but that sentence makes no sense "We don't pass in a payment intent when creating the setup intent though"

#

I'm not sure what the process is that you are trying to enable here.

daring tartan
#

Allow the user to setup a new payment method, for an existing subscription

marble warren
#

For the Payment Intent you passed off_session: "recurring" but the off_session parameter is a boolean and accepts true or false

daring tartan
#

correct, we didnt create that payment intent, that is done within Stripe. We just created a subscription, and that specific intent is for the renewal (also created by Stripe)

#

The issue we are having is that, the customer is not able to enter a new payment method given the ""You cannot confirm with the off_session parameter when setup_future_usage is also set on the PaymentIntent because you cannot set up future usages when processing payments off-session" error

marble warren
#

What is the scenario where the customer would be entering a new payment method?

daring tartan
#

They want to have the renewal charge go through a new card, not the one they had previously used

karmic flickerBOT
marble warren
#

And what is the interface you are using here?

daring tartan
marble warren
#

So the Invoices are created to charge automatically. So the Payment Intent they generate is configured to be charged off-session.

vague robin
#

brian-subscription-updatepm

daring tartan
#

The invoice was created on 9/10, but the customer was seeing the error updating the payment method on 9/8. I would have expected no PaymentIntent exists at that time no?

#

Also, you mean that even though there was an error creating the SetupIntent the payment method was created? We can't assign it as a default payment method if it doesnt exist

vague robin
#

I'm sorry I don't really follow your question. What is the exact error? What does your code look like? What is the request id of the failed request?

daring tartan
#

Exact error: "You cannot confirm with the off_session parameter when setup_future_usage is also set on the PaymentIntent because you cannot set up future usages when processing payments off-session"

#

We create the SetupIntent by using Stripe.js stripe.confirmSetup

vague robin
#

Can you share your exact code and an exact request id req_123 associated with that error so that I can help you?

daring tartan
#

I don't have a request id, just the customer id

#

it doesnt happen to all users

vague robin
#

If you have an error message, you should be able to find a request id too or at least provide an exact SetupIntent id

daring tartan
#

the error happened to a customer, not to me. They sent a screenshot, so I have the error message

vague robin
#

Are you the developer of the integration? If so you should be able to look at the logs in your account/Dashboard to find that request or more details. Or you should be able to know the Customer id, which SetupIntent id it is, etc.

#

Okay I looked at your logs and finally found one and it happens when calling the Pay Invoice API specifically

#

But I do need you to provide more actionable details to help you and confirm this is the real issue and has nothing to do with SetupIntent?

daring tartan
#

I am the developer, and know the customer id: cus_HzlfJamKhhgyJA If the SetupIntent failed to be created (given the error Stripe raised), then there is no SetupIntent id for me to provide.

#

what date are you seeing the error happen? The user complained about the error on 9/8, including a screenshot, so has to be on or before then

#

also, curious about the PayInvoice you mentioned since the invoice didnt exist until 9/10 (the renewal date)

vague robin
#

I'm sorry I'm really strugglign to help you with so few details. I am fairly certain the Create SetupIntent API can never cause this error. You also mentioned using confirmSetup() in Stripe.js which would happen after a successful SetupIntent crration.
Unfortunately right now it seems you might be mixing up various parts of your code or missing some important debugging information

daring tartan
#

We don't link the SetupIntent to the customer until confirmation succeeeds. We create the SetupIntent in the server, using the Stripe ruby library: Stripe::SetupIntent.create( usage: 'off_session', payment_method_options: payment_method_options, payment_method_types: [CARD.serialize], metadata: metadata, )

#

We can just focus on claryfing the error in that case "You cannot confirm with the off_session parameter when setup_future_usage..." , is this refering to the SetupIntent usage:off_session flag, or another object since it does not mention that

#

Also, if the though is that its a payment error, would love to see what invoice its linked to gien the error happened before 9/8 and the subscription renewal started on 9/10

vague robin
#

I'm really sorry, I can't really help you this way

#

Error messages can be raised by one or numerous API methods. And I don't really have a simple way to reverse engineer this without relevant information

#

The SetupIntent creation can't fail with this error, so when you get that error it does not come from the SetupIntent creation. It likely also does not come from the SetupIntent confirmation.

daring tartan
#

Can I get the documentation for this error?

#

so I know what object "You cannot confirm with the off_session" refers to

#

I cannot confirm a setup intent, a payment, something else?

vague robin
#

We don't have anything like this. We don't have a list of the thousands of possible errors our APIs can return. I think the next step is to look at https://stripe.com/docs/error-handling to properly catch all errors and log them reliably on your end including what API was called, what parameters were sent, the exact request id (req_123) which is returned as part of the error, etc.

But I think it's still what I explained earlier: You are hitting a strange error on the Pay Invoice API which looks like a bug. That part I would recommend reporting to our support team directly so that they can help you debug this further: https://support.stripe.com/contact

#

I'm also flagging that request I found to the eng team, this shouldn't be happening and isn't related to your code. I just don't know if you have other problems since you were saying this happens on SetupIntents which I don't think it does

daring tartan
#

thanks for flagging with the eng team ๐Ÿ‘ There is nothing for the user to pay before 9/10 so am surprised to see it could be possibly an issue with Pay. Happy that we are closing issues regardless!