Skip to content

Add way to update total and displayItems after .show() but before user interaction #645

@jenan-stripe

Description

@jenan-stripe

This is related to but different from #639.

Some users have reported to us that they may not know the total or line items at the time of attempting to open the payment sheet with show() -- there may be asynchronous server-based logic yet to be resolved.

Apple Pay provides an unrelated API that users can repurpose to work around this: if you listen for onpaymentmethodselected, you can get a loading state when the sheet opens and then asynchronously update the total and return control to the sheet. We have at least one user that has been relying on this behavior with Apple Pay.

Is it worth adding a way to signal that the browser should show a spinner or equivalent and wait to allow end user interaction until an update? The alternative is for Payment Request implementors to block the end-user action (not great) or show a manually-created loading modal (probably also not great).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions