The merchant frontend always receives a result when the customer exits the Pledg funnel.
In case of error, the result is a JSON which format is the same for all payment modes.
The error is an object containing two properties:
message, for instance:
message: "The provided property email is invalid"
The different values for
error.type are the following:
|Your settings are malformed (ex.: invalid
|The Pledg backend is under maintenance
|The Pledg backend failed
|The network failed
|The PSP of Pledg failed
|The PSP of the merchant failed (back mode only)
|The 3DS payment process could not be completed on time
|The customer is not eligible to this type of payment (an authorization may appear on the customer account but no money will be debited)
When an error occurs, it is passed to the merchant frontend and the payment funnel is closed.
If a payment is rejected by the PSP (3DS failed, insufficient funds, etc.), an error message is displayed to the user inside the payment funnel, but no error is passed to the merchant frontend. Indeed, in such as situation, the user keeps the possibility to retry with another card.