Signup+ sandbox
Learn how to test different scenarios using our sandbox environment.
Learn how to test different scenarios using our sandbox environment.
To ensure you make requests to the sandbox environment, use the sandbox base URL before any requests. This is https://api.truelayer-sandbox.com/
.
On this page, you can learn how to:
- achieve different test outcomes
- test the Payments flow with UK providers
- test age verification as part of a payment to a UK provider
- test the Payments flow with Finnish providers
- test the Data flow
- test the VRP flow
Different test outcomes for Signup+
Getting data through Signup+ works based on a payment id
, and age verification through Signup+ is applied based on parameters at payment creation.
What data you receive through Signup+ in sandbox, and whether an age verified payment succeeds or fails, is based on the value of the amount_in_minor
parameter in the initial payment request.
Test the different results of /signup-plus/payments
/signup-plus/payments
You can include the payment id
of a settled
payment as a query parameter to get user data through the /signup-plus/payments
endpoint.
If you do this in sandbox, the result you get depends on the value of the amount_in_minor
parameter in the payment. The possible results are:
Value of amount_in_minor | Signup+ response | Response type |
---|---|---|
Less than 1800 | Test user data 1: Tommie Burke. | Success |
1800 to 2099 | Test user data 2: Leon Gordon. | Success |
2100 to 2199 | Test user data 3: Isabella Allen. | Success |
2200 to 9999 | Range reserved for new test users. Defaults to test user data 3: Leon Gordon. | Success |
10000 to 24999 | Joint accounts not supported. | Error |
25000 to 34999 | User data not found. | Error |
35000 or greater | Range reserved for other scenarios. Defaults to User data not found error. | Error |
Test the different results of age verification
You need to contact us to enable age verification in sandbox.
If it's enabled, you can apply age verification to a payment by including a Boolean value of true
for the payment_method.beneficiary.verification.remitter_date_of_birth
parameter.
If you've applied age verification to a payment, you can test a variety of different results by changing the value of the amount_in_minor
parameter in the payment. The possible results are:
Value of amount_in_minor | Signup+ response | Response type |
---|---|---|
Less than 1800 | Age not legal. | Error |
1800 to 9999 | Identity data found. | Success |
10000 to 24999 | Joint accounts not supported. | Error |
25000 or greater | User data not found. | Error |
Test the Payments flow with UK providers
Before you can test the Signup+ payments flow in sandbox, you must have a payment with a status of settled
. After that, you can use the payment id
to make a request to the Signup+ /signup-plus/payments
endpoint.
1. Create a payment
See our documentation about how to create a payment. Additionally, our payments quickstart guide and Insomnia collection for Payments V3 may be useful.
The first step is to create a payment in the sandbox environment. Include the following values:
Field | Value |
---|---|
provider_id | mock-payments-gb-redirect |
payment_method | bank_transfer |
beneficiary | merchant_account |
amount_in_minor | Value for the scenario you want to test (see below) |
Use the signupplus
scope when authenticating the payment, so that you can use the same token with the <a href=”https://docs.truelayer.com/reference/getuserdatabypayment" target=”_blank”/signup-plus/payments
endpoint later.
Set
beneficiary
tomerchant_account
Signup+ does not support open-loop payments.
The sandbox payment authorisation flow redirects you to a mock UI provider where you authorise the payment. After authorisation, the payment usually settles within a few seconds. After this, you should have a payment_id
with a status of settled
available to use. We recommend that you wait for the payment_settled
webhook.
If needed, call the /payments/{id}
endpoint to check the current status of the payment.
2. Test different payments flow responses
Adjust the amount of the payment (amount_in_minor
field) to test different scenarios with Signup+:
Value of amount_in_minor | Signup+ response |
---|---|
< 10000 | Success: identity data found |
10000 - 25000 (inclusive) | Error: joint accounts not supported |
> 25000 | Error: user data not found |
Amount in minor notation
Make sure to convert the above amounts to minor notation when invoking our Payments API. For example, 250 GBP is 25000 in minor notation.
3. Make a payments request to Signup+
At this point, you should have a payment id
for a settled
payment, which was authorised with the signupplus
scope enabled.
Make a GET request to the /signup-plus/payments
endpoint. The Signup+ API reference and Insomnia collection can help you make this request. Include the id
in the request.
Test age verification in a UK payment
As part of a payment into your merchant account, you can enable age verification. You have to contact us to enable this for you, in both the sandbox and live environments.
This feature routes a payment through an intermediary TrueLayer account, checks the user is over 18 then either forwards the payment to you, or refunds it to the user. Verification can also check names, but you can't test this in sandbox with Signup+.
Include verification for your payments
If you've contacted us to enable verification for your client_id
in sandbox, you can test it as part of a Signup+ payment in sandbox.
To test verification, ensure that you include payment_method.beneficiary.verification
parameter in your closed-loop payment request to the /payments
endpoint.
The verification parameter should have a value of true
for the verification.date_of_birth
, as you can only verify age in combination with Signup+, not name.
Test Signup+ with age verification
Once verification is enabled and included in your request, use these values for the amount_in_minor
parameter to test different possible outcomes:
Value of amount_in_minor | Signup+ response |
---|---|
< 1800 | Error: Age not legal |
1800-10000 | Success: Identity data found |
10000-25000 | Error: Joint accounts not supported |
> 25000 | Error: User data not found |
Test the Payments flow with Finnish providers
Follow this guide to create a payment, generate an authorisation link and finally retrieve your user's identity details. To test specific scenarios with Finnish banks, set
When integrating with Finnish banks, there are 3 test scenarios that you can trigger in our sandbox environment:
- Identity authentication successful
Your user successfully makes a payment, and their identity details are confirmed. - Identity authentication cancelled by the user
Midway through the authentication process, your user cancels signup. - Identity authentication failed
Your user fails to pass the identity check.
Identity authentication successful
To test the happy path:
- Create a payment with an amount up to 250 EUR (A value of 25000 for
amount_in_minor
). - To mimic authentication with the identity provider, use one of the sets of test credentials below.
Note that these test credentials are based on Signicat's test users table. - Once the authorisation process is completed, validate that the
outcome
query parameter is set tosuccess
. - Use the
id
of the payment to look up the user's identity.
Test credentials to test Finnish identity authentication
You can use these banks to test identity authentication with Signup+. OP and Aktia are usually the easiest providers to test with, as they have prepopulated user credentials on their test login pages.
Bank name | Username (ID) | Password | National ID number |
---|---|---|---|
Aktia | Prepopulated | Prepopulated | 010170-999R |
OP | Prepopulated | Prepopulated | 070770-905D |
Säästöpankki | 11111111 | 123456 | 010100A001N |
Handelsbanken | 11111111 | 123456 | 010100A001N |
POP Pankki | 11111111 | 123456 | 010100A001N |
Danske Bank | 11111111 | 4545 | 280453-111A |
OmaSP | 11111111 | 123456 | 010100A001N |
Nordea | DEMOUSER1 | No password needed | 010200A9618 |
Nordea | DEMOUSER2 | No password needed | 291292-918R |
Nordea | DEMOUSER3 | No password needed | 030883-925M |
Nordea | DEMOUSER4 | No password needed | 170677-924F |
Ålandsbanken | Not available to test | n/a | n/a |
S-Pankki | Not available to test | n/a | n/a |
Note that these credentials could change. Visit this link for the latest valid credentials.
Identity authentication cancelled by the user
To test this scenario, cancel the authentication process with any of the test providers on the identity provider selection screen. Aktia or Nordea are usually good candidates for testing this flow.
At the end of this flow, validate that the outcome
query parameter is set to abort
.
Identity authentication failed
Create a payment above 250 EUR to test this scenario.
At the end of the authentication process, validate that the received outcome
query parameter is set to error
.
Test the Data-only flow
Before you test the Signup+ Data-only flow, you must have a Data access token.
After that, use the account_id
to make a request to the /signup-plus/accounts
endpoint.
The first step is to generate an authorisation link in the sandbox environment. Include these values:
Field | Value |
---|---|
response_type | code |
provider_id | mock |
scope | signupplus |
Ensure you have access to the redirect_uri
(you can set this in Console).
Then, after opening the authorisation link into a browser, enter some test credentials. Using john/doe will return 3 accounts, 1 for each scenario.
Account number | Scenario |
---|---|
25226660 | Success: identity data found |
18917060 | Error: joint accounts not supported |
00002724 | Error: user data not found |
After you successfully authorise the account connection, you're redirected to your redirect_uri
, which displays a code query parameter to grab.
Make a data request to Signup+
With the code you received in the previous step, make a request to the /signup-plus/accounts
endpoint. Optionally, include the account_id
query parameter.
Test the VRP flow
Before you test the Signup+ recurring payments flow, you need an authorised mandate. After that, use the mandate id
to make a request to the /signup-plus/mandates
endpoint.
1. Create a mandate
See our documentation about how to create a mandate. Additionally, our Insomnia collection for Payments V3 may be useful.
The first step is to create a mandate in the sandbox environment. When you do so, supply the following fields:
Field | Value |
---|---|
provider_id | ob-natwest-vrp-sandbox |
mandate.type | sweeping |
beneficiary | merchant_account |
provider_id | Success: identity data found |
constraints.maximum_individual_amount | Value for the scenario you want to test (see below) |
Use the signupplus
scope when authenticating the mandate, so that you can use the same token with the /signup-plus/mandates
endpoint later.
2. Test different variable recurring payments flow responses
Adjust the value of the constraints.maximum_individual_amount
in your sandbox payment (regardless of currency) to test different scenarios with Signup+:
Amount | Scenario |
---|---|
<100000 | Success: identity data found |
Between 100000 and 250000 (inclusive) | Error: joint accounts not supported |
> 250000 EUR | Error: user data not found |
Amounts in minor notation
Convert the above amounts to minor notation when invoking our Payments API. For example, 1000 EUR is 100000 in minor notation.
3. Make a VRP request to Signup+
At this point, you have a mandate id
for a mandate with a status of authorized
, which was authorised with the signupplus
scope enabled. It is recommended to wait for the mandate_authorized
webhook.
This means you can make a GET request to the /signup-plus/mandates
endpoint.
The Signup+ API reference and Insomnia collection can help you make this request.
Updated 3 months ago