#juangomez0120_api

1 messages ¡ Page 1 of 1 (latest)

robust moatBOT
#

👋 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/1458937742309458053

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

worldly hinge
#

Hi there - looking

#

Do you have a counter example to hand? like a run-of-the-mill PaymentIntent that succeeds?

#

Not a big deal but if you do it'll help me move faster

thick wyvern
#

I have the one used in my test env, would that work for you?

worldly hinge
#

As long as the code is the same as production, yes

thick wyvern
#

Terminal reader req: req_4vPhQyFKvVE0nW

Payment intent confirmation req: req_e4sokFyry6mVaZ

The only difference here is that the reader request was triggered from the stripe shell

worldly hinge
#

and you're using the server-driven integration, right?

thick wyvern
#

Correct

worldly hinge
#

ok so the operations on pi_3ShF4BBsYzIqHjob0In4aPQw differ significantly from your testmode example. I'll explain

#

the API calls are as follows:

  1. Create PaymentIntent
  2. Process PaymentIntent on reader
  3. Confirm PaymentIntent on client (paymentintent status = 'requires_capture') which is normal at this stage
  4. Process PaymentIntent again (hits error because status is requires capture
  5. trying to update PaymentIntent with a new PaymentMethod, which doesn't work because you're in requires_capture
  6. same as 5
  7. cancel
#

Confirmation is distinct from capture when using manual capture, which you are.

#

on pi_3SnQiiBsYzIqHjob12acJefP you make a call to capture immediately after confirming

thick wyvern
#

But both pi are created using the "capture_method": "manual" attribute, what's the difference between both payment intents that trigger a different confirmation flow ?

worldly hinge
#

I don't know - I only know what requests Stripe receives from your integration, not why you sent them.

thick wyvern
#

Ohh gotcha

#

Now I understand

worldly hinge
#

This looks like some kind of bug where you're calling process paymentintent multiple times and then trying to update the PaymentIntent with a newly collected card after confirmation

#

Which is not allowed

thick wyvern
#

You are right

#

Thanks for your help