# Result
The merchant frontend always receives a result when the customer exits the Pledg funnel.
# Success
In case of success,
- The customer is redirected to
redirectUrl?pledg_result={}
. - Formerly, the result was a JSON which fields depend on the payment mode (see back mode, transfer mode).
# Error
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: type
and message
, for instance:
{
type: "invalid_request_error",
message: "The provided property email is invalid"
}
The different values for error.type
are the following:
Name | Cause |
---|---|
3DS_confirmation_timeout | The 3DS payment process could not be completed on time or the payment confirmation is taking too long |
ancv_timeout | When the ANCV payment confirmation is taking too long, we consider it as a timeout |
bad_gateway | The PSP of the merchant failed (back mode only) |
disabled_merchant | When the payment solution is disabled, the user cannot continue |
error_token | When the token is invalid or expired |
gateway_timeout | When the request is taking too long to process, the router times out the request and sends an error |
genericError | A generic error occured |
identification_confirmation_timeout | When the identification process is taking too long, we consider it as a timeout |
invalid_merchant_uid | When the payment solution cannot be found |
invalid_request_error | Your settings are malformed (ex.: invalid merchantUid , invalid email , invalid amountCents , ...) |
maintenance | When the API is in maintenance mode |
internal_error | When the server encounters an unexpected condition that prevents it from fulfilling the request |
missing_merchant_uid | When the merchantUid is missing or invalid |
network_error | The network failed |
not_eligible | The customer is not eligible to this type of payment (an authorization may appear on the customer account but no money will be debited) |
payment_refused | The payment could not be processed |
retry_error | When the retry may not be possible due to ineligibility |
transaction_timeout | The transaction has either expired or there is insufficient time remaining to complete the process |
wrong_share_uid | When the current part to pay is not found, or the token is invalid |
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.