#blackwall_api

1 messages ยท Page 1 of 1 (latest)

woeful ridgeBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1283872334389969007

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

pine hornetBOT
pulsar pewter
#

pm_1PbZD1AfW39ks7SDcp2ifrOe passed in that request is not attached to a customer

#

Basically you'll need to collect those payment method details again and create a new payment method and attach it to the customer before you can use it.

severe pebble
#

But you can see that the previous request did!

req_ale3mjhtVX2PiG

west shoal
#

Hi there ๐Ÿ‘‹ can you share an example where you used setup_future_usage in the first payment intent and still encountered this error later?

west shoal
#

When did you make that request? I see that's the same Payment Method ID that you shared earlier which had been consumed already by a Payment Intent that didn't use setup_future_usage.

The intent you created using that Payment Method in this request did not use setup_future_usage and so the Payment Method was consumed rather than set up:
https://dashboard.stripe.com/logs/req_ale3mjhtVX2PiG

severe pebble
#

Ok so what you are suggesting is that i add to all my paymentIntents the flag: setup_future_usage=off_session?

Also isn't this supposed to be that?

"off_session": "true",

west shoal
#

Not all of them, no. That should only be set on the first intent where you're setting up the payment method for future usage, otherwise all of your payments will be likely to trigger the requirement of additional customer action if you're in a region where 3DS is heavily used.

Alternatively, you can make the request to attach the Payment Method to the Customer prior to creating any payments for them. So essentially moving this request in your flow so it happens before the first payment is processed:
https://dashboard.stripe.com/logs/req_xCUDtAIOcZVgW7

severe pebble
#

Sorry but i am not clear.

Right now I create the payment intent without the flag.

The possible fix is to add this flag to teh FIRST payment.

This will fix the problem.

You are suggesting that i should NOT add this to a second pyament intent ( say the second month ) becuase i could trigger additional customer action? How could this be the case if ia m using an alread created payment method, the customer is being renewd, they have already authorized the charges.

Most of my customers are US

west shoal
#

If you set setup_future_usage on a Payment Intent, that's how you indicate to us that you plan to use the Payment Method that is provided/createed again in the future. That's how we know to tell the banks that you plan to do that as well, and the banks tend to want more authentication for setting up future payments.

So for the first payment, where you're setting up the payment method, you set setup_future_usage accordingly. Then for later payments you remove that so you don't trigger the setup process again for an already set up payment method.

If you're in the US the risk will be minimal, as SCA isn't required there and issues are allowed to optionally choose whether they want to use 3DS, with most of them not doing so for now.

severe pebble
#

ok let me try that. I can reply to this thread tomorrow? I process like 60 orders a day, i usually get 1 or 2 that come back

#

so i'll know tomorrow if the flag is correct, and i guess in a month i can see if this is working :/

west shoal
#

You can test in testmode and make sure the flow works rather than waiting on live traffic.
https://docs.stripe.com/test-mode

We don't keep threads open that long, we'll close it after about 20 mins of inactivity as they're meant for synchronous discussion. If you want to deploy the change in livemode and see if it works, then you can create a new thread tomorrow if it doesn't and there are additional questions.