Skip to content

System

Run all health checks for the API and return a consolidated status report covering the database, cache, storage, SignalR, Service Bus, and external service dependencies.

GET /v1/health

Auth: Access token (Bearer).

Responses

StatusDescription
200All health checks completed. Individual entry statuses may indicate degraded or unhealthy dependencies.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequired
statusstring?No
totalDurationstringNo
entriesobject?No
timeCheckedstringNo
json
{
  "status": "string",
  "totalDuration": "string",
  "entries": {},
  "timeChecked": "string"
}

Code samples

ts
// @vantagepay/vantagepay
// Returns the service health status.
// Not wrapped by the JavaScript SDK - call the endpoint directly with the active token.
const response = await fetch(baseUrl + '/v1/health', {
  method: 'GET',
  headers: { Authorization: 'Bearer ' + ApiTokens.accessToken },
})
const result = await response.json()
csharp
// VantagePay.SDK
// Returns the service health status.
// Not wrapped by the .NET SDK - call the endpoint directly with an authorized HttpClient.
using var http = new HttpClient { BaseAddress = new Uri("https://sandbox-api.vantagepay.dev") };
http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", client.ApiTokens.AccessToken);
var response = await http.GetAsync("/v1/health");
response.EnsureSuccessStatusCode();

Receive one or more client-side log messages and write them to the server-side Serilog pipeline, enriched with request headers and authenticated user context.

POST /v1/logging

Unauthenticated callers must supply a Referer header whose host matches the configured API domain. Authenticated callers are always accepted.

Auth: Access token (Bearer).

Request body

json
[
  {
    "timestamp": "string",
    "level": 0,
    "template": "string",
    "properties": []
  }
]

Responses

StatusDescription
200All messages were logged successfully.
400The request failed validation, the error object will contain further information.
403The caller is not authenticated and the referrer host did not match the API domain.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
json
{
  "success": true
}

Code samples

ts
// @vantagepay/vantagepay
// The SDK buffers and submits logs automatically; use the structured logger.
client.log.info('User {Username} logged in from {Country}', 'jane', 'GHA')
await client.log.flush()
csharp
// VantagePay.SDK
// The SDK buffers and submits logs automatically; use the structured logger.
client.Log.Info("User {Username} logged in from {Country}", "jane", "GHA");
await client.FlushLogsAsync();

Simple ping to check connectivity from a client.

GET /v1/ping

Auth: Access token (Bearer).

Responses

StatusDescription
200The request was successful but does not return any results.
500An unexpected error occurred, the error object will contain further information.

Response body

json
"string"

Code samples

ts
// @vantagepay/vantagepay
await client.system.ping()
csharp
// VantagePay.SDK
bool isOnline = await client.System.PingAsync();

Get the version of this API and all it's loaded modules.

GET /v1/version

Sample

json
GET /v1/version

Auth: Access token (Bearer).

Responses

StatusDescription
200Request was successful and reading the versions of loaded modules.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequired
environmentstring?No
versionstring?No
modulesarray<string>?No
pluginsarray<string>?No
extensionsarray<string>?No
json
{
  "environment": "string",
  "version": "string",
  "modules": [
    "string"
  ],
  "plugins": [
    "string"
  ],
  "extensions": [
    "string"
  ]
}

Code samples

ts
// @vantagepay/vantagepay
// Returns the deployed API version.
// Not wrapped by the JavaScript SDK - call the endpoint directly with the active token.
const response = await fetch(baseUrl + '/v1/version', {
  method: 'GET',
  headers: { Authorization: 'Bearer ' + ApiTokens.accessToken },
})
const result = await response.json()
csharp
// VantagePay.SDK
// Returns the deployed API version.
// Not wrapped by the .NET SDK - call the endpoint directly with an authorized HttpClient.
using var http = new HttpClient { BaseAddress = new Uri("https://sandbox-api.vantagepay.dev") };
http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", client.ApiTokens.AccessToken);
var response = await http.GetAsync("/v1/version");
response.EnsureSuccessStatusCode();

Payments for Africa