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 Error | Subunit Amount |
---|---|
failureCode: |
|
failureCode: |
|
Payment transitions
It is possible to simulate different payment transitions, which are used to apply various states to a payment during processing.
paymentDescriptor Key | Description | Values |
---|---|---|
| Payment requires authentication.
Triggers the |
|
| Specify the available authentication methods. More info.
Depends on |
|
| Payment requires provider confirmation.
Triggers the |
|
| Specify the delay in seconds for provider confirmation.
Depends on |
|
| Payment requires capture.
Triggers the |
|
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 Key | Description | Values |
---|---|---|
errorOn | Specify the operation for the error to occur. | AUTHORIZE AUTHENTICATE PROVIDER_CONFIRM CAPTURE VOID REFUND |
errorMessage | Specify the free text error message. | Default: Failed to process payment |
Example:
{
"paymentDescriptor":"requiresCapture=true;errorOn=AUTHORIZE;errorMessage=Hello World",
Authentication types
REDIRECT
You'll receive a requestUrl
which allows for the simulation of successful or failed authorization.

SCAN_CODE
You'll receive the codeType
QR. Render the QR code and use the PPRO Mock Scanner on your mobile device to scan the QR and select the authorization outcome.

MULTI_FACTOR
No authentication details are returned for MULTI_FACTOR
. Submit the verificationCode
777123
to the authorization endpoint in to receive a successful authorization.
POST /v1/payment-charges/{paymentChargeId}/authorizations
{
"authenticationResult": {
"type": "MULTI_FACTOR",
"details": {
"verificationCode": "777123"
}
}
}
Updated 4 days ago