#ian_code

1 messages ยท Page 1 of 1 (latest)

solar cobaltBOT
#

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

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

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

dense crypt
#

Hello ๐Ÿ‘‹

We don't provide support for Flutter packages here, I'm sorry to say

toxic crescent
#

same question for Reactive Native, which Flutter is based on.

dense crypt
#

If you are using Flutter, it means there's a layer between the code you are writing and the code we control

toxic crescent
#

I can see on the Apple Pay Platform Payment Dialog
[Card]
[Change Payment Method]
[Contact]
[Ship To]
[Method
Delivery - XX.XX]
items
Sub Total (without delivery)

dense crypt
#

What Stripe element are you using?

toxic crescent
#

we are supplying cartItems, and shippingMethods

#

we have the cartItems for the product, and Standard Shipping with a cost.

But unclear if expected the price at the bottom of the Apple Pay Platform Payment Sheet is expected to be the sub total without the shipping costs?

dense crypt
#

What doc are you following?

toxic crescent
#

I thought the user would see the total amount.

#
#

want to make sure the Apple Pay user, is seeing the correct price, authorising for the correct total amount.

#

not sure if this is by design on apple, or an issue how we are populating the total price.

solar cobaltBOT
bold idol
#

๐Ÿ‘‹ the amount shown and authorized is based on the PaymentIntent's amount that you provided from your backend.

toxic crescent
bold idol
#

Gotcha

toxic crescent
#

there isn't an amount, but is these cartItems and shippingMethod.
Would be interested if was just a way to show an amount

bold idol
#

I believe an amount should show based on the amount in the cartItems? Are you not seeing that? I haven't tested this flow in a while so I don't recall exactly.

#

What does the Apple Pay modal look like exactly here?

toxic crescent
#

that is what we are seeing, but there is also a Standard Delivery fee selected, and not included in the total at the bottom?

#

based on the shippingMethods entered, which has the default shipping option selected. (only 1)

bold idol
#

You are saying that by setting a ShippingMethod with an amount but that isn't added to the total of the cartItems?

#

Do you have a screenshot so I can see exactly what you mean here?

toxic crescent
#

should we add the chosen shipping method as a line item on the Cart as well?

bold idol
#

And if you open up the part with the cart items what do you see

toxic crescent
#

we are only adding the products to the cart, is a screenshot from a colleague, so can't click through.

#

so would just be the one product in the cart.

#

not sure if expected to be automatic, that the chosen delivery cost would be added to the total.
Or on apple pay only the sub total is shown.
Or if we need to do something to get the delivery cost added to the line items/total shown.

bold idol
#

I also don't recall exactly... I think the shipping amount isn't dynamically added here even though intuitively it seems like it should be. If you give me a few mins to build my sample I can test as well. But you may have to add the shipping amount as a cartItem amount and I can put in a feature request to see if we can have it correctly sum in the future if this is the case (also not sure if this is a limitation on Apple's end).

toxic crescent
#

given there is only the 1 delivery option,
we could add the delivery cost as a separate line item.

#

yeah, be good to know what is the expected way

#

I guess throught to add delivery costs under shippingMethods, but good to know if we should just ignore that, and add as a cartItems

bold idol
#

Yeah I know there is an internal ticket open for that issue

bold idol
#

Hmm okay I think there is a bug actually ๐Ÿ™

#

I'm seeing that when I add multiple cartItems it is only showing in the UI the amount of the last cartItem.

#

And ignoring the ShippingMethod as well

toxic crescent
#

apart from the display issue, is the payment method collected for the right amount, with shipping?

#

(obvs dispaly is important too)

bold idol
#

Well if you are using collectPaymentMethod() then the amount is solely dependent on your backend.

#

The UI has no affect on the actual amount charged.

#

So what I'd recommend here is to bundle the full amount into one cartItem for now.

toxic crescent
#

yeah, but that doesn't allow collecting delivery address/allow delivery address selection if I recall correctly.

#

yeah, 1 line item would wokr

bold idol
#

I'll file a ticket to get the UI issue fixed

#

Overall it will never have an affect on the amount charged as that is always solely dependent on the PaymentIntent amount which can only be set on your backend.

toxic crescent
#

yeah, just the user should see the same price on the dialog.

#

I was asking this on earlier thread, what would happen if amount on Payment Method collected from this dialog, was less than the amount on the payment intent. Conclusion was to ensure the same.

bold idol
#

Has no affect

#

Feel free to test it if you like, but when using createPlatformPayPaymentMethod() all it is doing is creating a PaymentMethod and then closing the sheet.

#

It has no knowledge of a PaymentIntent or any difference in the intended value to charge.

toxic crescent
#

but the user is seeing that price,
I wondered if would be an issue if the price charged was higher, if the payment request would fail.

#

was trying to ask this in previous thread.

#

suggested adding another dialog after, to show final price.

#

after shipping selection

bold idol
#

Nope it has no influence

toxic crescent
#

but told to get shipping country first, to ensure price shown in dialog is correct.

bold idol
#

I also just tested with confirmPlatformPayPayment() and it doesn't care about the value difference either.

#

Now this is different from our Web flow (Express Checkout Element / Payment Element)

#

That does have amount validation.

#

So maybe that is where the confusion is here?

#

But in this mobile flow it doesn't matter if the amount in the UI differs.

toxic crescent
#

hmm ok, so it could work then, to not have to have a fake address set, to set a delivery method, before delivery collected from Google Pay/Apple Pay.
Then show an extra final confirmation, if there is an extra delivery charge.
Good to know, just still see what's cleaner.

bold idol
#

๐Ÿ‘

#

I'll file a ticket about the UI issue

toxic crescent
#

could there be a way to just set an amount as well?

#

rather than having to add the cart items?

bold idol
#

I don't think so

toxic crescent
#

seems one flow allows it, if creating from payment intent, but this other way, where we want to collect shipping address doesn't

bold idol
#

I'm seeing errors requiring cartItems...

#

You could use the pending label on cartItems though

toxic crescent
#

what does Stripe do for the other route, where create the Apple Pay Platform Payment dialog from a Payment Intent, or from a Payment Sheet?

#

doesn't have knowledge of the cart items then

bold idol
#

When using PaymentSheet you mean?

#

Instead of PlatformPay ?

toxic crescent
#

yeah, either the other constructor, which didn't allow requesting shipping address, or just PaymentSheet which get created from a payment intent client secret.

bold idol
toxic crescent
#

yeah, so how does that get around not supplying the cartItems?

bold idol
#

You can see cartItems are optional there

#

I don't know why PlatformPay was built to require cartItems... can't speak to that.

toxic crescent
#

yeah, think that's my query, if that is something in the Stripe React SDK - if that could support just an amount

#

I'll got with the one line item for now, but that would be good one to know, then would be aligned to Google Pay, and the other constructor.

bold idol
#

Yeah fair feedback

#

I'll put in a feature request for that as well.

#

Though no guarantee on that getting actioned in the near term

toxic crescent
#

yeah, thanks for that, understood, hopefully save some future person asking the same thing.

bold idol
#

Yep appreciate your feedback