Set up a payment method for your payment app

Learn how payment providers publish a payment method identifier, payment method manifest, and web app manifest so browsers can discover their payment app.

Published: September 27, 2017, Last updated: November 20, 2026

This guide is for payment providers building a web-based or Android payment app. To make your payment app work with the Payment Request API, you host a URL-based payment method identifier and two manifest files that tell the browser how to verify and launch your app.

Payment app types

A payment method can be supported by a web-based payment app, an Android payment app, or both:

  • Web-based payment app: A service worker that Chrome launches in a modal window. Users don't need to install anything.
  • Android payment app: An installed app that Chrome launches with an Android intent. Chrome verifies the app's package name and signing certificate.

Web-based payment apps are available in Chrome on all platforms, but not in WebView. Android payment apps are available in Chrome on Android and in WebView.

If both app types are available for a payment method and your web app manifest sets prefer_related_applications to true, Chrome hides your web-based payment app. Otherwise, users might see both in the Payment Request UI and choose between them.

Browser support

Web Payments APIs have limited browser availability.

Payment Request API

Payment Handler API

How a browser discovers a payment app

Every payment app needs to provide the following:

  • URL-based payment method identifier
  • Payment method manifest (except when the payment method identifier is provided by a third party)
  • Web app manifest
Diagram: How a browser discovers the payment app from a URL-based payment method identifier

The discovery process starts when a merchant initiates a transaction:

  1. The browser sends a request to the payment method identifier URL and fetches the payment method manifest.
  2. The browser determines the web app manifest URL from the payment method manifest and fetches the web app manifest.
  3. The browser determines whether to launch the web-based payment app or the OS payment app from the web app manifest.

The next sections explain in detail how to set up your own payment method so that browsers can discover it.

Step 1: Provide the payment method identifier

A payment method identifier is a URL-based string. For example, Google Pay's identifier is https://google.com/pay. Payment app developers can pick any URL as a payment method identifier as long as they have control over it and can serve arbitrary content and HTTP headers. In this article, we'll use https://bobbucks.dev/pay as the payment method identifier.

How merchants reference your payment method identifier

Merchants construct a PaymentRequest object with a list of payment method identifiers for the payment apps they accept, passing your identifier in the supportedMethods property. For example:

const request = new PaymentRequest([{
  supportedMethods: 'https://bobbucks.dev/pay'
}], {
  total: {
    label: 'total',
    amount: { value: '10', currency: 'USD' }
  }
});

Step 2: Serve the payment method manifest

A payment method manifest is a JSON file that defines which payment app can use this payment method.

Provide the payment method manifest

When a merchant initiates a payment transaction, the browser sends an HTTP HEAD request to the payment method identifier URL. The payment method identifier URL responds with a Link HTTP header that points to the URL where the browser can fetch the payment method manifest.

Configure the payment method server to respond with a HTTP Link header with the rel="payment-method-manifest" attribute and the payment method manifest URL. For example, if the manifest is at https://bobbucks.dev/pay/payment-manifest.json, the response header would include:

Link: <https://bobbucks.dev/pay/payment-manifest.json>; rel="payment-method-manifest"

The URL can be a fully-qualified domain name or a relative path. Inspect https://bobbucks.dev/pay for network traffic to see an example. You may use a curl command as well:

curl --include https://bobbucks.dev/pay

The browser sends an HTTP GET request to the payment method manifest URL next. The server responds with the payment method manifest body.

A payment method manifest has two fields, default_applications and supported_origins.

Property name Description
default_applications (required) An array of URLs that points to web app manifests where the payment apps are hosted. (The URL can be a relative). This array is expected to reference the development manifest, production manifest, etc.
supported_origins An array of URLs that points to origins that may host third-party payment apps implementing the same payment method. Note that a payment method can be implemented by multiple payment apps.
Payment method manifest fields

A payment method manifest file should look like this:

[payment handler] /pay/payment-manifest.json:

{
  "default_applications": ["https://bobbucks.dev/pay/manifest.json"],
  "supported_origins": [
    "https://alicepay.friendsofalice.example"
  ]
}

When the browser reads the default_applications field, it finds a list of links to web app manifests of supported payment apps.

Step 3: Serve a web app manifest

A web app manifest is used to define a web app as the name suggests. It's a widely used manifest file to define a Progressive Web App (PWA).

Typical web app manifest would look like this:

[payment handler] /pay/manifest.json:

{
  "name": "Pay with BobBucks",
  "short_name": "BobBucks",
  "description": "This is an example of the Payment Handler API.",
  "icons": [
    {
      "src": "images/manifest/icon-192x192.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "images/manifest/icon-512x512.png",
      "sizes": "512x512",
      "type": "image/png"
    }
  ],
  "serviceworker": {
    "src": "service-worker.js",
    "scope": "/pay/",
    "use_cache": false
  },
  "payment": {
    "supported_delegations": ["shippingAddress", "payerName", "payerEmail", "payerPhone"]
  },
  "start_url": "/",
  "display": "standalone",
  "theme_color": "#3f51b5",
  "background_color": "#3f51b5",
  "prefer_related_applications": true,
  "related_applications": [
    {
      "platform": "play",
      "id": "dev.bobbucks",
      "min_version": "1",
      "fingerprints": [
        {
          "type": "sha256_cert",
          "value": "20:C9:72:AE:21:F8:C3:E8:0C:14:06:23:20:5B:E4:42:51:22:90:77:B5:15:7A:3B:FB:2A:23:99:67:DB:57:F9"
        }
      ]
    }
  ]
}

Chrome reads different fields depending on the type of payment app. For a web-based payment app, Chrome reads name, icons, serviceworker, payment, and prefer_related_applications. For an Android payment app, Chrome reads only related_applications.

Property name Description
name (required) Used as the payment app name.
icons (required) Used as the payment app icon in the browser UI.
serviceworker Web-based payment apps only. Defines the service worker that runs as the payment app.
serviceworker.src The URL to download the service worker script from.
serviceworker.scope A string representing a URL that defines a service worker's registration scope.
serviceworker.use_cache Whether the browser can use its HTTP cache when fetching the service worker script.
payment.supported_delegations Web-based payment apps only. The shipping and contact information the payment app can provide: shippingAddress, payerName, payerEmail, or payerPhone. Android payment apps declare this in AndroidManifest.xml instead.
related_applications Android payment apps only. Identifies the app and its signing certificate. Find more details in the Android payment app developers guide.
prefer_related_applications Set to true to hide the web-based payment app when the Android payment app is installed.
Important web app manifest fields

The web app manifest's name property is used as the payment app name, icons property is used as the payment app icon.

How Chrome determines which payment app to launch

Launch a web-based payment app

Specify your web-based payment app in the web app manifest's serviceworker field.

[payment handler] /pay/manifest.json:

"serviceworker": {
  "src": "service-worker.js"
}

The browser launches the web-based payment app by sending a paymentrequest event to the service worker. The service worker doesn't have to be registered in advance. It can be registered just-in-time.

Launch an Android payment app

To launch an Android payment app, the following conditions must be met:

  • The related_applications field is specified in the web app manifest and:
    • The installed app's package ID and signature match, while the minimum version (min_version) in the web app manifest is less than or equal to the version of the installed application.
  • The Android payment app is installed and has:
    • An intent filter of org.chromium.intent.action.PAY.
    • A payment method identifier specified as the value for the org.chromium.default_payment_method_name property.

Check out the Android payment app developers guide for more details about how to set these up.

[payment handler] /pay/manifest.json:

"prefer_related_applications": true,
"related_applications": [{
  "platform": "play",
  "id": "dev.bobbucks",
  "min_version": "1",
  "fingerprints": [{
    "type": "sha256_cert",
    "value": "20:C9:72:AE:21:F8:C3:E8:0C:14:06:23:20:5B:E4:42:51:22:90:77:B5:15:7A:3B:FB:2A:23:99:67:DB:57:F9"
  }]
}]

If prefer_related_applications is true and the Android payment app is available, Chrome hides the web-based payment app. Otherwise, Chrome also looks for the web-based payment app.

Special optimizations

How browsers can skip the Payment Request UI and launch a payment app directly

In Chrome, when show() method of PaymentRequest is called, the Payment Request API displays a browser-provided UI called the "Payment Request UI". This UI allows users to choose a payment app. After pressing the Continue button in the Payment Request UI, the selected payment app is launched.

Payment Request UI intervenes before launching the payment app.

Showing the Payment Request UI before launching a payment app increases the number of steps needed for a user to fulfill a payment. To optimize the process, the browser can delegate fulfillment of that information to payment apps and launch a payment app directly without showing the Payment Request UI when show() is called.

Skip the Payment Request UI and launch the payment app directly.

To launch a payment app directly, the following conditions must be met:

  • show() is triggered with a user gesture (for example, a mouse click).
  • There is only a single payment app that:
    • Supports the requested payment method identifier.
    • Supports all the shipping and contact information the merchant requests.

When is a web-based payment app registered just-in-time (JIT)?

Web-based payment apps can be launched without the user's explicit prior visit to the payment app website and registering the service worker. The service worker can be registered just-in-time when the user chooses to pay with the web-based payment app. There are two variations for the registration timing:

  • If the Payment Request UI is shown to the user, the app is registered just-in-time and launched when the user clicks Continue.
  • If the Payment Request UI is skipped, the payment app is registered just-in-time and launched directly. Skipping the Payment Request UI to launch a just-in-time registered app requires a user gesture, which prevents unexpected registration of cross-origin service workers.

Next steps