Magnius API (20.08.0)

Magnius API Team: it@magnius.com URL: https://www.magnius.com

Magnius payments API

Using the API

Authentication

Authentication is managed using an API key that is provided to you. Every HTTP call to our API should contain a custom header called apiKey. The value of this header must be the API key.

You can find your API key under Developers > API key in our customer login environment.

Currencies and Amounts

To make our platform support all currencies and to prevent rounding errors, amounts are stored as natural numbers, paired with an exponent. This exponent defines at which position the decimal point/comma is placed, counting from the right.

Say we have and amount of $12.34 USD. It will be stored and presented as 1234 with an exponential of 2. Some currencies, like the Japanese Yen, have no exponent. A transaction amount of ¥1,000 JPY is stored as 1000.

Filtering and Searching

Filters can be used to interact with any object. Objects can be queried by appending parameters to the query string of the URL.

So to get a list of all settled US dollar transactions with an amount equal or greater than 75.00, we would use the following URL:

/v1/transaction?status=SETTLED&amount>=7500

Populating Results

The API supports population. This means that fields that reference a certain object will be automatically resolved. Population can be achieved by providing the relevant fields the query parameter _populate.

As an example, let's take a payment profile object:

{
    "id": "7c23a50d-8699-431c-a82b-a78718d2b6f6",
    "organisation": "c96b2d81-51db-4a8a-a0e9-19918c168a3c",
    "name": "My Euro profile",
    "currency_code": "EUR",
    ...
}

To know the name of the organisation that this payment profile belongs to, we would have to make an api-call requesting the organisation with ID c96b2d81-51db-4a8a-a0e9-19918c168a3c.

Population allows us to let the server do this for us. If we call /paymentprofile/7c23a50d-8699-431c-a82b-a78718d2b6f6?_populate=organisation, we get the following results:

{
    "id": "7c23a50d-8699-431c-a82b-a78718d2b6f6",
    "organisation": {
        "id": "c96b2d81-51db-4a8a-a0e9-19918c168a3c",
        "name": "Example Company",
        "parent_id": "cc5a8e9b-a39a-4e53-b404-668a5426cca2"
    }
    "name": "My Euro profile",
    "currency_code": "EUR",
    ...
}

Error codes

Each request made to the API may return an error object of the following shape:

Field Type Description
code Number A 3-digit identifier
timestamp Number The time when the error occurred
message String A description of the error
[details] Object Optional, may contain information specific to the error. Used for debugging

Click here to see the complete list of codes.

The code field is something on which one can rely: it will remain the same in future implementations and it is easy to parse. The message and details properties however are not intended to be manipulated by a program. They would rather serve for debugging and are only expected to be read by human beings: they are likely to be adjusted in the future (to make them clearer or more precise).

Bank Account

List bank accounts

query Parameters
_limit
integer
Default: "2000"

The maximum amount of results

_populate
string

Populates the full details of a related resource. It's possible to populate multiple resources. Separate the resources by space