Mock providers [Payments V2]
Learn about the mock providers you can use to test a Payments API v2 integration in sandbox.
The /v2/single-immediate-payments-providers
endpoint in the sandbox environment includes three mock providers which can be used for testing your integration with our API.
Mock UK Payments — Redirect flow
Mock UK Payments - Redirect flow simulates UK banks that use the redirect authorisation flow.
When you initiate a payment using this provider, we will return a URI to redirect your user to our mock provider authorisation page.
{
"provider_id": "mock-payments-gb-redirect",
"logo_url": "",
"icon_url": "",
"display_name": "Mock UK Payments - Redirect Flow",
"country": "GB",
"divisions": [
"retail"
],
"single_immediate_payment_schemes": [
{
"scheme_id": "faster_payments_service",
"requirements": [
...
]
}
]
}
On the authorisation prompt page, different actions lead to different outcomes for the payment.
The following table describes the different actions you can make on the authorisation page and their outcomes:
Outcome | Action | Username |
---|---|---|
Execute | Enter username | test_executed |
Auth failure | Enter username | test_authorisation_failed |
Execution Rejection | Enter username | test_execution_rejected |
Cancellation | Click cancel button | - |
Once you log in with one of the predetermined usernames, the mock provider will present the account selection page. When you provide the remitter account details in the payment initiation request, only the stated account can be selected on this screen.
Mock European Payments — Redirect flow
Mock European Payments — Redirect flow represents the typical redirect authorisation flow used by a bank in Europe.
Even though the country code in the provider_id
is currently ES
, the functionality can be assumed to be equivalent to the other redirect flow banks that can be found in the European region. Hence this bank can be used to test any redirect flow for the European banks.
{
"provider_id": "mock-payments-es-redirect",
"logo_url": "",
"icon_url": "",
"display_name": "Mock European Payments – Redirect Flow",
"country": "ES",
"divisions": [
"retail"
],
"single_immediate_payment_schemes": [
{
"scheme_id": "sepa_credit_transfer",
"requirements": [
...
]
},
{
"scheme_id": "sepa_credit_transfer_instant",
"fee_options": [
{
"fee_option_id": "sepa_credit_transfer_instant_fee",
"beneficiary_fee": "free",
"remitter_fee": "payable"
}
],
"requirements": [
...
]
}
]
}
When you initiate a payment using this provider, we will return a URI to redirect your user to our mock provider authorisation page.
Different actions on this page will lead to different outcomes for the payment.
The following table describes the different actions you can make on the authorisation page and their outcomes:
Outcome | Action | Username |
---|---|---|
Execute | Enter username | test_executed |
Auth failure | Enter username | test_authorisation_failed |
Execution Rejection | Enter username | test_execution_rejected |
Cancellation | Click cancel button | - |
After you log in with one of the predetermined usernames for the test case, an account selection page will be the next step. If you provide the remitter account details in the payment initiation request, you can only select the account with those details on this screen.
Mock European Payments – Embedded Flow
Mock European Payments – Embedded Flow provider represents European banks that use the embedded authorisation flow.
{
"provider_id": "mock-payments-de-embedded",
"logo_url": "",
"icon_url": "",
"display_name": "Mock European Payments – Embedded Flow",
"country": "DE",
"divisions": [
"retail"
],
"single_immediate_payment_schemes": [
{
"scheme_id": "sepa_credit_transfer",
"requirements": [
...
]
},
{
"scheme_id": "sepa_credit_transfer_instant",
"fee_options": [
{
"fee_option_id": "beneficiary_pays",
"beneficiary_fee": "payable",
"remitter_fee": "free"
},
{
"fee_option_id": "remitter_pays",
"beneficiary_fee": "free",
"remitter_fee": "payable"
}
],
"requirements": [
...
]
}
]
}
This mock provider only provides the embedded input flow and no UI elements. As seen in the providers
response object, this bank requires the additional inputs psu-id
and psu-password
. The expected value for psu-id
is test_username. The expected value for psu-password
is test_password. If you input anything other than these values, the mock provider will reject the payment.
Once you initiate the payment with this mock provider will ask for SCA method
with a select
type input. There are two values to choose from: SMS and PhotoTAN.
Following the submission of the input value to this embedded step, you will be required to enter a text input (For PhotoTAN, our API will provide an image, however this image does not play any role in how the flow continues).
Different values to this input will lead to different outcomes for the payment. The input values required for certain outcomes are the same for SMS
and PhotoTAN
options.
The inputs and related outcomes can be seen in the following table:
Outcome | Input Value |
---|---|
Execute | test_executed |
Auth failure | test_authorisation_failed |
Execution rejection | test_execution_rejected |
If you use any other value, it will result in authorisation failure.
To test the cancellation scenario, use the cancel
embedded step instead.
Updated 7 months ago