The expectation of the Web Payments Working Group is that those who mint payment method identifiers that are URLs (see [[METHOD-IDENTIFIERS]]) will also publish machine readable information that describes how that method participates in the PaymentRequest ecosystem. This specification defines the format and addressing of payment method manifest files.

Usage Examples

Use Cases

This specification intends to address the following use cases:

  1. The owner of a payment method wishes to authorize only certain parties to distribute payment apps that are capable of implementing the payment method. In this use case, the browser helps to ensure that for that payment method, the user can only invoke payment apps from parties authorized by the owner of the payment method.
  2. In addition, the owner of a payment method wishes to confirm the authenticity of a particular payment app (e.g., via a digital signature for that app).
  3. When the user has not yet installed a payment app for a payment method, the user agent can provided an improved user experience for procuring a payment app.

Example Manifest

This section gives an examples of payment method manifest.


	// payment-manifest.json
{
  // Android:
  "android": [{
    "package": "xyz.bobay.app",
    "version": 10,
    "sha256_cert_fingerprints": ["14:6D:E9:83:C5:73:06:50"],
    "platforms": {
      "play": "https://play.google.com/store/apps/details?id=com.bobspayments.app1"
    }
  }],
  // Web:
  "name": "Bob's Payments",
  "icons": [{
    "src": "icon/lowres.webp",
    "sizes": "48x48",
    "type": "image/webp"
  }, {
    "src": "icon/lowres",
    "sizes": "48x48"
  }, {
    "src": "icon/hd_hi.ico",
    "sizes": "72x72 96x96 128x128 256x256"
  }, {
    "src": "icon/hd_hi.svg",
    "sizes": "257x257"
  }],
  // iOS:
  "ios": {...},
  // Other supported payment apps:
  "externally_supported_apps": ["https://alicepay.com/pay"]
}
            

Manifest File Addressing

The link header concept is defined in RFC5988. In this specification, HTTP link header is used to point to the payment method manifest file. For performance reasons, it is desirable to be able to retrieve all information about a payment method (both human-readable and machine-readable) in a single HTTP request. HTTP link header could be used to achieve this goal.

The format of the HTTP link header for manifest is:

  • Link: < payment manifest file URL >; rel="payment-method-manifest"
  • For example, the following HTTP link header could be used:

  • Link: < https://alicepay.com/pay/ >; rel="payment-method-manifest"
  • A new relationship type "payment-method-manifest" need to be resisted by IANA.

    Manifest File Format

    Define here the overall file format in a way that enables forward and backward compatibility.

    Extensibility

    The expectation is that the manifest contents may change over time. What is our extensibility mechanism?

    Error Handling

    How are unrecognized names handled? Bad values?

    Payment App Data

    This specification defines two sections of a payment method manifest file:

    In the following example, the payment method owner has declared that:

          
    	// payment-manifest.json
    {
      // Android:
      "android": [{
        "package": "xyz.bobay.app",
        "version": 10,
        "sha256_cert_fingerprints": ["14:6D:E9:83:C5:73:06:50"],
        "platforms": {
          "play": "https://play.google.com/store/apps/details?id=com.bobspayments.app1"
        }
      }],
      // Web:
      "name": "Bob's Payments",
      "icons": [{
        "src": "icon/lowres.webp",
        "sizes": "48x48",                                                                                                                                                                                       
        "type": "image/webp"
      }, {
        "src": "icon/lowres",
        "sizes": "48x48"
      }, {
        "src": "icon/hd_hi.ico",
        "sizes": "72x72 96x96 128x128 256x256"
      }, {
        "src": "icon/hd_hi.svg",
        "sizes": "257x257"
      }],
      // iOS:
      "ios": {...},
      // Other supported payment apps:
      "externally_supported_apps": ["https://alicepay.com/pay"]
    }
    
          

    Origins Authorized to Distribute Payment Apps

    Talk here in more detail about externally_supported_apps, etc.

    Data about Authorized Payment Apps

    Talk here in more detail about payment_apps, etc.

    How is a default app identified?

    Security Considerations

    What happens when there is no payment method manifest available? Is it the responsibility of this specification to define a single error handling behavior? Or at least some security considerations?