#fbcosta
1 messages · Page 1 of 1 (latest)
hi! I don't think you can no, that is how Apple displays the sheet when using a non-final amount(https://developer.apple.com/documentation/apple_pay_on_the_web/applepaylineitem/1916084-type), which is what we do when using the PaymentElement with a SetupIntent with no immediate payment. So can't really be changed.
hey @noble arch thanks for your answer! Would I be able to just set the amount to £0.00 and then use the saved card details to charge the full amount if the bid is successful at a later date?
Hi! I'm taking over this thread.
Where you do want to set that £0.00? By creating a PaymentIntent for that amount?
Replace the "amount pending" message with £0.00. Essentially just collect the card details but charge nothing
and then at a later date (if the bid is successful), charge the card for the bid amount
Like karllekko said, I don't think you can change that message when using a SetupIntent with Apple Pay.
referring to the link he shared, it seems that if we set the line item’s type to final, the payment sheet displays the value in amount (instead of 'pending'). In this case we could set the final to £0.00 no?
Give me a few minutes to look into this.
@upper topaz thanks!
it's not possible no since you don't control the integration at that level.
if you use a SetupIntent, we use a non-final item that is pending
if you use a PaymentIntent, we use the amount of that PI in the line item
you can't create a PaymentIntent for an amount less than 50c
if this is a major blocker you'd have to directly integrate with https://stripe.com/docs/stripe-js/elements/payment-request-button instead of/in addition to PaymentElement(you can disable wallets from the PaymentElement so you have your own PaymentRequestButton but keep the rest) since in that integration you directly control the items. https://stripe.com/docs/js/payment_request/create#stripe_payment_request-options-displayItems
see also https://developer.apple.com/design/human-interface-guidelines/technologies/apple-pay/subscriptions-and-donations for Apple's guidance on how this should look and the use of the pending item
@noble arch ok thanks for the info 🙏 I'll look into this
hey @noble arch one last question about this actually: when using stripe payment element, on google pay the amount says £0.00. Why is this possible with google pay but not apple pay?
because they're different and that's how Google treats the same information
Google doesn't have the concept of a 'pending' amount, when we pass the same thing we pass to Apple, Google renders it as $0, they're just different sheets
again Apple recommends in their HID the pending behaviour it seems, so I'd probably trust our defaults here to be doing the right thing, though there are ways to change it if you wish(and since its' on the web there's no App Review for Apple to deny you)
@noble arch ah right ok. By "ways to change it" are you referring to the payment-request-button mentioned above, or something else within pyament element / paymentIntent?
the former
ok thanks for your help!