#cuperdino_unexpected

1 messages ยท Page 1 of 1 (latest)

timid spruceBOT
#

๐Ÿ‘‹ 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/1288048218797637653

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

brazen hedge
#

hi! what code are you using for this, how exactly do you integrate?

jolly raven
#

On the backend side or on the iOS side?

brazen hedge
#

both

#

and the PaymentIntent ID pi_xxx

#

and context on what precisely the "confirmation screen" is

jolly raven
#

the backend is in GO, unfortunately I don't have all the details there as I am on the iOS side, but I know the overall flow. We are first creating a payment intent without tax and returning that to the iOS side. Then before showing the confirmation screen on the iOS side (more precisely the paymentConfirmationSheet exposed through the Stripe SDK in SwiftUI) we perform an update to the payment intent on the backend by calling the Stripe Tax api to calculate taxes and then update the total amount of the payment intent with the taxes applied

#

And let me lookup the payment intent id

brazen hedge
#

I see. I've never used this paymentConfirmationSheet or learned SwiftUI so I can't quickly test it on my end in my testing iOS app and I don't see other reports , so not sure how much I can say without a support ticket so we can spend more time replicating this in my team, but can have a look at the PaymentIntent/frontend code/screenshots

jolly raven
#

I am just trying to find the payment intent, and I'll send it over, but otherwise you suggest creating a support ticket?

brazen hedge
#

I would yes, a detailed email with all the information/IDs/code/screenshots

jolly raven
#

Ok, i just recreated it now, this is the payment intent id: pi_3Q2U7ME9ID75GP240sIIG7gW, and here is a screen shot. The amount here should be 299.41, but it's 299.40

#

And it's for other payment methods as well, such a Link, not just Apple Pay

brazen hedge
#

so perhaps the issue is that it's not refreshed on the frontend. There's maybe/probably a function you can call for that(I know there is in stripe.js at least), let me look.

jolly raven
#

Ok, i can't see the dashboard unfortunately, it seems like i don't have access to it, but if there is some way to update it that could possibly be the reason

brazen hedge
#

but otherwise maybe it's a timing thing and when you do "Return this payment intent to the iOS app, and display it in the confirmation screen." , you're doing that before your backend has updated the PaymentIntent.

jolly raven
#

I am awaiting it on my side

brazen hedge
#

not sure what you mean by that.
you probably want to get access and work closely with your backend developer I think. There was 5 seconds between creating the PaymentIntent and updating it, so maybe it's within those 5 seconds you display the paymentConfirmationSheet and take the screenshot

jolly raven
#

Ok thanks for the feedback, I'll try and see if it's a timing issue, otherwise I'll reach out with a support ticket

brazen hedge
#

I can't find any function to tell the sheet to "refresh" and re-retrieve the PaymentIntent unfortunately. I know nothing about the lifecycle of SwiftUI but maybe it's a matter that you need to re-create/re-show the "paymentConfirmationSheet" after your backend tells you changes have been made

jolly raven
#

Ok, thank you very much for the input, I can look further into this

timid spruceBOT
onyx orbit
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

jolly raven
#

Hi, I am looking into this potential timing issue, as the PaymentIntent seems to be 299.40 at one point, and then becomes 299.41. What would be the correct way to handle this. I am awaiting it on my end, and on the backend we are also awaiting the update of the payment intent before returning it to the iOS side

onyx orbit
#

please give me a minute to catch up

#

you should rely on webhooks for async tasks

jolly raven
#

Thanks, I might have figured it out, it looks like it was on our end. Still looking into it, but I think you can close this thread

onyx orbit
#

sure let me know if you need any more help