PayerErrors

Deprecated

This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

Non-standard

This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

The PayerErrors dictionary is used by the Payment Request API to indicate the presence of—and to explain how to correct—validation errors in the payer details. For each field in the payment information that fails validation, the PayerErrors object contains a string explaining the error.

The payer details include the payer's name, phone number, and email address.

Properties

email Optional
If present, this DOMString is a string describing the validation error from which the payer's email address—as given by PaymentResponse.payerEmail—currently suffers. If this property is absent from the PayerErrors object, the email address passed validation.
name Optional
If this DOMString is present in the object, the PaymentResponse.payerName property failed validation, and this string explains what needs to be corrected. If this property is absent, the paer name is fine
phone Optional
If present, this string is an error message explaining why the payer's phone number (PaymentResponse.payerPhone) failed validation. This property is absent if the phone number passed validation.

Browser compatibility

BCD tables only load in the browser