Allow a payment handler to request a larger initial window size

Open
#1,075 7 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
html

Research direction

Start at PaymentRequestEvent.openWindow() and the payment app manifest fields named in the issue: name, icons, and serviceworker. Compare the proposed manifest hint with an openWindow() parameter, including how browser-specific constraints may apply. Done means the specification has one agreed mechanism for requesting a larger initial presentation.

Written by the indexing model from the issue text.

Description

Problem

When a web-based payment handler opens a window via PaymentRequestEvent.openWindow(), the
browser is free to choose how much of the screen that window occupies. In practice, on Android,
this window opens at a partial (half-screen) height by default, requiring the buyer to manually
expand it before they can see or interact with the full payment app UI. The spec currently has no
mechanism for a payment handler to express a preference for a larger initial presentation.

Proposed solution

Add an optional way for a web-based payment handler to indicate it needs a larger initial
presentation, for example:

  • A field in the payment app manifest (alongside name, icons, serviceworker) indicating a
    preferred initial size or display mode, or
  • A parameter on openWindow() (or a new method) allowing the handler to request full-height
    presentation from the start.

As with other capabilities in this spec, the browser could still ignore the hint or apply
implementation-specific constraints — this would just give payment handlers a way to express
intent.

Screenshots

Image
The payment handler window opened at its default partial (half-screen) height.
Image
The same window after the buyer manually drags it open to full height.
Dominant language
HTML
Stars
510
Forks
139
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from w3c/payment-request

All issues in w3c/payment-request

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.