PaymentMethodManifestRequest Class

A URL-based payment method identifier whose payment method manifest can be ingested, given to UserAgentUIBackend.IngestPaymentMethodManifestAsync.

public sealed class PaymentMethodManifestRequest : UserAgentPrompt
Inheritance
UserAgentPrompt PaymentMethodManifestRequest

Properties

NameDescription
MethodIdentifierGets the URL-based payment method identifier.

MethodIdentifier

PaymentMethodManifest.cs

Gets the URL-based payment method identifier.

public string MethodIdentifier { get; }

Property value

string

Methods

NameDescription
FetchAsync(CancellationToken)Fetches the payment method manifest (https://w3c.github.io/payment-method-manifest/#fetch-payment-method-manifests) and the web app manifests of its default applications (https://w3c.github.io/payment-method-manifest/#fetch-the-web-app-manifest-for-a-default-payment-app), with the document of the request as client and without credentials: a HEAD request to the identifier (up to 3 redirects, all same site with the identifier) finds the first Link header whose relation is payment-method-manifest, then the manifest is fetched (https: only, without redirect) and parsed. Returns null when a step fails.

FetchAsync(CancellationToken)

PaymentMethodManifest.cs

Fetches the payment method manifest (https://w3c.github.io/payment-method-manifest/#fetch-payment-method-manifests) and the web app manifests of its default applications (https://w3c.github.io/payment-method-manifest/#fetch-the-web-app-manifest-for-a-default-payment-app), with the document of the request as client and without credentials: a HEAD request to the identifier (up to 3 redirects, all same site with the identifier) finds the first Link header whose relation is payment-method-manifest, then the manifest is fetched (https: only, without redirect) and parsed. Returns null when a step fails.

net10.0

public Task<PaymentMethodManifestResult?> FetchAsync(CancellationToken cancellationToken = default)

net11.0

public Task<PaymentMethodManifestResult?> FetchAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken
A token to cancel the fetches.

Returns

Task<PaymentMethodManifestResult?>

Remarks

As in Chromium, whose user agent fetches the manifests without CORS, the responses are read whatever their Access-Control-Allow-Origin header (the specification uses the "cors" mode).