PaymentMethodManifest Class

A parsed payment method manifest (https://w3c.github.io/payment-method-manifest/#parsed-payment-method-manifest): the web app manifests of the default payment applications of a payment method, and the origins whose payment handlers can handle the payment method.

public sealed class PaymentMethodManifest

Properties

NameDescription
DefaultApplicationsGets the URLs of the web app manifests of the default payment applications (https: URLs, without duplicates).
SupportedOriginsGets the serializations of the origins whose payment handlers can handle the payment method (https: origins, without duplicates).

DefaultApplications

PaymentMethodManifest.cs

Gets the URLs of the web app manifests of the default payment applications (https: URLs, without duplicates).

public IReadOnlyList<string> DefaultApplications { get; }

Property value

IReadOnlyList<string>

SupportedOrigins

PaymentMethodManifest.cs

Gets the serializations of the origins whose payment handlers can handle the payment method (https: origins, without duplicates).

public IReadOnlyList<string> SupportedOrigins { get; }

Property value

IReadOnlyList<string>

Methods

NameDescription
Parse(ReadOnlySpan<byte>, string)Validates and parses a payment method manifest (https://w3c.github.io/payment-method-manifest/#validate-and-parse): returns null when the content is not a JSON object, or when its default_applications or supported_origins member is not a non-empty array of valid URLs (https: URLs, relative to url, for the applications; https: origins for the supported origins). The other members are ignored.

Parse(ReadOnlySpan<byte>, string)

PaymentMethodManifest.cs

Validates and parses a payment method manifest (https://w3c.github.io/payment-method-manifest/#validate-and-parse): returns null when the content is not a JSON object, or when its default_applications or supported_origins member is not a non-empty array of valid URLs (https: URLs, relative to url, for the applications; https: origins for the supported origins). The other members are ignored.

public static PaymentMethodManifest? Parse(ReadOnlySpan<byte> content, string url)

Parameters

content ReadOnlySpan<byte>
The content of the manifest, encoded as UTF-8.
url string
The URL of the manifest, against which the URLs of the applications are resolved.

Returns

PaymentMethodManifest?

Exceptions

ArgumentException
url is not an absolute URL.