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 are comprised of the payer's name, phone number, and email address.


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.



Specification Status Comment
Payment Request API
The definition of 'PayerErrors' in that specification.
Candidate Recommendation Initial definition.

Browser compatibility

No compatibility data found. Please contribute data for "api.PayerErrors" (depth: 1) to the MDN compatibility data repository.

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.