Mock authenticator

To simplify and accelerate integration with our payment flows, PPRO provides a mock authenticator in the Sandbox environment. This feature lets you simulate multiple authentication methods and reproduce a variety of authorization outcomes, enabling full end-to-end testing without real payments or dependency on a provider’s sandbox availability and functionality.

You can access the mock authenticator by setting the paymentMethod to MOCK. Different scenarios are simulated through combinations of the amount and paymentDescriptor fields. By supplying specific key combinations, you can reproduce a wide range of outcomes and test your integration under different conditions.

📘

For payment methods without a provider sandbox, or where the sandbox cannot support a full end-to-end flow, a preconfigured mock authenticator is used to replicate that payment method.

Authorization failures

It is possible to simulate specific authorization failures using the amount field. Failures always occur for amounts between 300000 (€3,000) and 400000 (€4,000), and specific errors can be triggered based on the subunit amount.

Authorization ErrorSubunit Amount
failureCode: GENERIC_DECLINE
failureMessage: Payment Authorization Failed
01
Example: 300001
failureCode: INSUFFICIENT_FUNDS
failureMessage: Payment Authorization Failed, insufficient funds
02
Example: 300002

Payment transitions

It is possible to simulate different payment transitions, which are used to apply various states to a payment during processing.

paymentDescriptor KeyDescriptionValues
requiresAuthenticationPayment requires authentication.
Triggers the AUTHENTICATION_PENDING status.
true false
authenticationTypeSpecify the available authentication methods. More info.
Depends on requiresAuthentication
REDIRECT SCAN_CODE MULTI_FACTOR
Default: REDIRECT.
providerConfirmationPayment requires provider confirmation.
Triggers the AUTHORIZATION_ASYNC status.
true false
providerConfirmationDelaySpecify the delay in seconds for provider confirmation.
Depends on providerConfirmation
nns
Default: 10s
requiresCapturePayment requires capture.
Triggers the CAPTURE_PENDING status.
true false

Payment flows

To simulate different payment flows include the authenticationType key with the required types. Learn how to complete each of the authentication types within mock authenticator here.

Example:

{
"paymentDescriptor":"requiresAuthentication=true;authenticationType=REDIRECT,SCAN_CODE,MULTI_FACTOR",

Error simulation

Error simulations are used to trigger errors on the different operations.

paymentDescriptor KeyDescriptionValues
errorOnSpecify the operation for the error to occur.AUTHORIZE AUTHENTICATE PROVIDER_CONFIRM CAPTURE VOID REFUND
errorMessageSpecify the free text error message.Default: Failed to process payment

Example:

{
"paymentDescriptor":"requiresCapture=true;errorOn=AUTHORIZE;errorMessage=Hello World",