Sandboxes
Sandbox providers are providers designed to allow integrators of the Qard API to test their implementations and integrations of our data without requiring them to first find a prospective customer willing to contribute their own accounts. It does so by providing a set of fixture data, that is accessed the same way any other provider's data would, by synchronizing it, and then fetching it from the appropriate endpoints.
Here are the sandbox providers for your tests:
Banking sandbox_openbanking | The Sandbox Banking provider simulates the flow of requiring the user to authorize access to their data. To finalize the connection of this provider, you will have to manually navigate to the url described the field redirect_url, simulating the actions of a user. | |
Public data sandbox_public | The Public data Sandbox provider simulates a public data provider, and so does not need to simulate a user authorizing access to their data. To simulate an invalid Background Check, you can create :
| |
Private data sandbox_private | The Sandbox Private provider simulates the flow of requiring the user to authorize access to their data. To finalize the connection of this provider, you will have to manually navigate to the url described the field redirect_url, simulating the actions of a user.To test tax returns without warnings:
| |
OCR sandbox_ocr | The Sandbox OCR provider simulates the ocr_service extraction flow. It does not read the submitted file; instead, it returns fixture data based on the type of the tax return input.Accepted input type values: COMPLETE or SIMPLIFIED. Any other value marks the input as FAILED with the error Invalid type: must be COMPLETE or SIMPLIFIED.Because fixtures are static per type, synchronizing multiple inputs of the same type only creates one Tax Return; subsequent inputs are marked SUCCESS without duplicating the model. | |
Commercial sandbox_commerce | The Sandbox Commerce provider simulates the flow of requiring the user to authorize access to their data. To finalize the connection of this provider, you will have to manually navigate to the url described the field redirect_url, simulating the actions of a user. |
Sandboxes Integration
1. Enable the Sandbox
{
"enable": true
}
2. Settings Sandbox provider:
{
"auto_connect": (true|false)
}
3. Create Sandbox data connection:
{
"requested_data_types": [
"COMMERCE_TRANSACTION",
"COMMERCE_BALANCE",
"COMMERCE_DISPUTE",
"COMMERCE_SUBSCRIPTION",
"COMMERCE_CUSTOMER",
"COMMERCE_PRODUCT",
"COMMERCE_LOCATION",
"COMMERCE_ORDER",
"COMMERCE_TRANSACTION_INSIGHT",
"COMMERCE_SUBSCRIPTION_INSIGHT",
"COMMERCE_DISPUTE_INSIGHT"
],
"provider_name": "sandbox_commerce"
}
3.1 Simulate the user authorization by navigating to the redirect_url find in the response body:
Extra step only for the following providers : sandbox_commerce, sandbox_openbanking and sandbox_private.
{
...
"redirect_url": "https://api.qardfinance.com/connect/5d4b4c862666a12e7dcecd16ae68fb3f9af2eb5e35f85fa3da0fa51b9caba125",
...
}
3. Create a synchronization:
After validating that the data connection status is CONNECTED, you can run a new synchronization.
{
"data_types": [
"COMMERCE_TRANSACTION",
"COMMERCE_BALANCE",
"COMMERCE_DISPUTE",
"COMMERCE_SUBSCRIPTION",
"COMMERCE_CUSTOMER",
"COMMERCE_PRODUCT",
"COMMERCE_LOCATION",
"COMMERCE_ORDER",
"COMMERCE_TRANSACTION_INSIGHT",
"COMMERCE_SUBSCRIPTION_INSIGHT",
"COMMERCE_DISPUTE_INSIGHT"
]
}
Sandbox OCR Integration
The sandbox_ocr provider follows the same setup as the other sandboxes, but requires an additional step: you must submit a tax return input before synchronizing, the same way you would with the real ocr_service provider.
1. Enable the Sandbox OCR provider:
{
"enable": true
}
2. Settings Sandbox OCR provider:
{
"auto_connect": true
}
3. Create Sandbox OCR data connection:
{
"requested_data_types": ["TAX_RETURN"],
"provider_name": "sandbox_ocr"
}
4. Add a tax return input:
The submitted file is not processed. The type field drives which fixture is returned (COMPLETE or SIMPLIFIED).
{
"tax_return_id": "string",
"data": {
"file": "file (base64)",
"type": "COMPLETE"
}
}
5. Create a synchronization:
{
"data_types": ["TAX_RETURN"]
}
After synchronization, the input process_status transitions to SUCCESS and the generated Tax Return can be retrieved via GET /api/v6/users/{userId}/tax-returns. See ocr_service for details on the input status endpoint and response fields.