#dankfarrik-payment-request-button
1 messages ยท Page 1 of 1 (latest)
Yes! when you set up for total and displayItems each item has a pending parameter you can set.
https://stripe.com/docs/js/appendix/payment_item_object#payment_item_object-pending
Complete reference documentation for the Stripe JavaScript SDK.
Oh that's great, thank you very much. One other follow up question. If the user selects a different shipping rate (presumable at a different price), is there a callback for me to then update the total at that point? The only callback I'm aware of and am using is the "shippingaddresschange" one, but that doesn't also fire when changing shipping rates does it?
Yep, you can update the request: https://stripe.com/docs/js/payment_request/update
Complete reference documentation for the Stripe JavaScript SDK.
and provide a new total etc, but not while the payment sheet is open (which affects you here)
shippingoptionchange is the event for the rate selected:
https://stripe.com/docs/js/payment_request/events/on_shipping_option_change
Complete reference documentation for the Stripe JavaScript SDK.
Ah, that's what I was missing! I had been following the docs and it doesn't include that event. I'm all set, thanks!
This is easily the best dev support I've ever gotten, I really appreciate it!
Very pleased to hear that, and you're welcome ๐