w3c / payment-method-id

Payment Method Identifiers specification
https://w3c.github.io/payment-method-id/
Other
23 stars 20 forks source link

Should a payment method identifier (URL) resolve to a machine readable resource that describes it? #3

Closed adrianhopebailie closed 7 years ago

adrianhopebailie commented 8 years ago

Migrated from https://github.com/w3c/browser-payment-api/issues/46 by @msporny

Migrating from https://github.com/w3c/webpayments/issues/30:

If the payment app identifier or payment method identifier is a URL, should there be a resource that can be fetched from the URL?

Yes. We should suggest that the resource should be machine-readable (expressed as JSON-LD, at a minimum) for the reasons specified here:

http://www.w3.org/TR/json-ld/#introduction

Is there a need to describe the payment method at the URL or provide some other information?

We should not require it, but encourage it.

At a bare minimum, you could publish a human readable string in various languages for the payment method / app. You could also publish the payment method and/or apps branding image.

You could also make it so that a payment method URL may list the payment apps that are capable of processing the payment method. This would make it easy for user agents to retrieve a payment app if one isn't available in the user agent already. It could address the "no available payment apps" use case. I'm not suggesting that's how it would work, just that it seems like there are enough use cases to think more deeply about it.

adrianhopebailie commented 8 years ago

The proposal from @dlongley (previously included as requirements in an earlier version of the spec) is as follows:

This text was proposed as a set of requirements for content from resolved payment method identifiers:

      <section>
        <h2>Content at Payment Method Identifier URLs</h2>
        <p>
          Payment method identifier URLs that resolve to content:
        </p>
        <ol>
          <li>MUST be served over HTTPS,</li>
          <li>SHOULD support HTTP Content Negotiation,</li>
          <li>SHOULD provide a human-readable document that describes the
          payment method when <code>text/html</code> is requested, and</li>
          <li>SHOULD provide a machine-readable document that describes the
          payment method when <code>application/ld+json</code> is requested.
          </li>
        </ol>
      </section>
ianbjacobs commented 7 years ago

Closing this issue because we answered "yes" for PMIs that are URLs.