Web
...
Web SDK
Payment Form Error Messages
displaying payment form error messages the web sdk is designed to provide feedback quickly and clearly to the consumer to display payment form error messages add a div with the id judopay errors on your page, ideally below the iframe \<div class="judopay errors">\</div>; the table below displays all errors that can be returned id error string 0 card number can only contain numbers 1 card number not valid 2 card type not recognised, please recheck your number 3 {1} is not supported 4 card number required 5 card is expired 6 card expiry date is not valid 7 expiry date required 8 {0} code too short for {1} card 9 {0} code too long for {1} card 10 {0} code can only contain numbers 11 {0} code required for {1} card 12 post/zip code is invalid 13 sorry, an error has occurred, you have not been charged 14 cardholder name is required 15 cardholder name can't be less than 4 characters 16 cardholder name can't contain numbers or special characters for error strings containing {0} and {1} , these will be changed into values depending on the current state of the iframe form for example { 0 } will change to the card verification code acronym this is named differently depending on the card type (e g cvc, cvv) { 1 } will refer to the detected card type, for example visa, mastercard, diners club international or discover if the iframe has detected a visa number, the following error message transform would occur {0} code too long for {1} card" > "cvc code to long for visa card a similar error with an american express card, the message would appear as cid code too long for american express card" web sdk error responses there are 2 possible error formats error responses from our transaction api (which the web sdk formats and returns) these are caused by the transaction itself, for example incorrect payment credentials failure of 3d secure 2 for more information on this type of error, see payment form error messages /#enhanced error messaging for web sdk errors thrown by the web sdk code examples of causes can be scripts failing to load closing of a modal time outs for more information on this type of error, see here enhanced error messaging for web sdk for web sdk version 0 0 29 (or higher), the error response object has the following additional fields describing the error name status judodetails not all errors returned from the web sdk will have the new format described below this only refers to errors that originated from our transaction api (previous to version 0 0 29) having the following interface {message string} error object response fields field description message string a text description of the error name string represents a name for the type of error status number a http response status code judodetails object object giving additional context to the error for further details on the interface of the judodetails object, including examples, see payment form error messages /#judodetails object this field is optional optional examples of the enhanced error response the enhanced error response provides an error object with additional fields to increase the description of the error, for example enhanced error response enhanced error response judodetails object the judodetails object aims to provide additional context around the error see below for further information on the optional judodetails object that is now included in the error response judodetails interface field description message string a text description of the error code number a static numeric code associated with the specific error category number the type of error 1 requesterror 2 modelerror 3 configerror 4 duplicationerror / processingerror 5 exceptionerror details object object giving additional context to the error for examples on what this object may look like, see payment form error messages /#judodetails examples this field is optional optional for modelerror array of fielderrors describing one or more attributes for duplicationerror provides the receiptid and url of the duplicate transaction judodetails examples example category 1 response will contain one or more fielderrors in the details block example category 2 example category 3 example category 4 example category 4 example category 5