PaymentSheetResponse Class

The response of the user who accepts a payment in the payment sheet (https://w3c.github.io/payment-request/#user-accepts-the-payment-request-algorithm), returned by UserAgentUIBackend.ShowPaymentSheetAsync and UserAgentUIBackend.RetryPaymentAsync: it becomes the PaymentResponse of the page.

public sealed class PaymentSheetResponse

Constructors

NameDescription
PaymentSheetResponse()

PaymentSheetResponse()

PaymentSheetPrompt.cs
  • Obsolete: Constructors of types with required members are not supported in this version of your compiler.
[Obsolete("Constructors of types with required members are not supported in this version of your compiler.", true)]
public PaymentSheetResponse()

No documentation is available.

Properties

NameDescription
DetailsGets the response of the payment handler, serialized to JSON (https://w3c.github.io/payment-request/#dom-paymentresponse-details): a JSON object whose shape is defined by the payment method. A text that is not JSON is an internal error of the payment handler: the promise of the page is rejected with an OperationError.
MethodNameGets the identifier of the payment method that the user selected (one of PaymentSheetPrompt.Methods).
PayerEmailGets the email address of the payer (used when the request requests it), or null.
PayerNameGets the name of the payer (used when the request requests it), or null.
PayerPhoneGets the phone number of the payer, formatted as E.164 (used when the request requests it), or null.
ShippingAddressGets the full shipping address chosen by the user when the request requests shipping, or null to use the last address given to PaymentSheetPrompt.ChangeShippingAddressAsync. A request that requests shipping is accepted only with a shipping address and a shipping option (PaymentSheetPrompt.ShippingOption): otherwise the user aborts the payment request.

Gets the response of the payment handler, serialized to JSON (https://w3c.github.io/payment-request/#dom-paymentresponse-details): a JSON object whose shape is defined by the payment method. A text that is not JSON is an internal error of the payment handler: the promise of the page is rejected with an OperationError.

public string Details { get; init; }

Property value

string

Gets the identifier of the payment method that the user selected (one of PaymentSheetPrompt.Methods).

public required string MethodName { get; init; }

Property value

string

Gets the email address of the payer (used when the request requests it), or null.

public string? PayerEmail { get; init; }

Property value

string?

Gets the name of the payer (used when the request requests it), or null.

public string? PayerName { get; init; }

Property value

string?

Gets the phone number of the payer, formatted as E.164 (used when the request requests it), or null.

public string? PayerPhone { get; init; }

Property value

string?

ShippingAddress

PaymentSheetPrompt.cs

Gets the full shipping address chosen by the user when the request requests shipping, or null to use the last address given to PaymentSheetPrompt.ChangeShippingAddressAsync. A request that requests shipping is accepted only with a shipping address and a shipping option (PaymentSheetPrompt.ShippingOption): otherwise the user aborts the payment request.

public ContactAddress? ShippingAddress { get; init; }

Property value

ContactAddress?