Introduction
Let's get you started building with Testbank 💸
Testbank is a HTTPS JSON REST API, compliant to the JSON:API specification, that lets you simulate bank accounts & transactions without interacting with real money.
This is ideal for software that interacts with real-world banks - you can build a generic "testbank" integration alongside your other "real" lenders & only expose real lenders when you're ready.
This API offers endpoints for you to:
CRUD operations on Accounts.
List & create Transactions between Accounts.
Requests
You must only send HTTPS requests to this API.
This API reads & writes in JSON - no other formats are supported.
Authentication is required for each request.
You should paginate endpoints where endpoints support it.
Non-secure (HTTP) traffic will be dropped.
Setting the Accept header to a value other than
application/json
will return a406 Not Acceptable
status.Unauthenticated requests will return a
401 Unauthorized
status to protected resources.Cross-Origin Resource Sharing (CORS) is not supported.
Requests or responses larger than 5MB will fail - please paginate endpoints to reduce the likelihood of seeing this error.
Authentication
You will be given a private static Authentication Token by your account manager. This token must be used in all requests you make to the Testbank API, and should be provided in the Authorization header as a Bearer token:
Includes
Following the JSON:API specification, you can get the response body of a request to include resources for relationship data by passing an include
query string parameter with the appropriate comma-separated string of paths.
For example, to return the Accounts when fetching a Transaction by ID, you would use:
Pagination
Some endpoints support paginating resources. For these endpoints, you will see:
By default, all endpoints that support pagination will return 20 resources, with a maximum of 100 resources.
You can calculate the total number of pages by rounding up the value of
meta.total
÷meta.limit
.links.prev
/links.next
will benull
if there is no previous/next page, respectively.If you include your own pagination query (e.g.
?page[limit]=50
) in your request, the API will adjust thelinks
accordingly.
For the stability of your integration, you shouldn't try to parse links
, or try to guess/construct the format of URLs, as your integration will break if the URL format is changed in the future.
FAQs
Last updated