Authentication

The secursus API works with your Secursus account. Each website registered to your account has a unique API key and a secret authentication key.

This API call is used to test the connection and get account status information.

Status code

The status code contained in the response of the API under the "status" label repect the HTTP response status codes. The "success" label of the response contains a Boolean value for a faster analysis.

Errors

Two main cases of errors are expected here:

  • An error with your identifiers
  • An error on disabled websites

Note: you can choose to disable one of your website to block access to the API. To do this you must go to your Secursus Integration account.

Response informations

The response data contains three main informations :

Entry Data type Description
id String Returns the website API key.
authenticated Boolean Returns the result of the authentication test.
website String Returns the domain name of the associated website.
mode String Returns if website is in test mode or in production mode.
period_amount Integer Total amount of insurance fees for the current period in euro cents.
have_incident Boolean Returns information about possible payment incidents. If a payment incident occurs, you have a period of one month to regularize your situation.

Request

curl https://developer.secursus.com/api/auth \
-u your_apiKey:your_secretKey

Response

{
"response": {
"success": true,
"status": "200",
"title": "OK",
"detail": ""
},
"data": {
"id": "your_apiKey",
"authenticated": true,
"website": "https://www.domain.com",
"mode": "production",
"period_amount": 0,
"have_incident": false
}
}
...
...