Skip to main content

get maintenance schedule

divit occasionally schedules maintenance on the real-time payment rails (for example an FPS scheme outage, or bank-side collection maintenance). you can query these windows ahead of time so your checkout can warn customers, or avoid submitting a payment that would be rejected.

this endpoint is public — no API key is required.


endpoint details​

  • HTTP method: GET
  • production URL: https://api.divit.com.hk/service/status
  • sandbox URL: https://sandbox-api.divit.dev/service/status

query parameters​

parameterrequiredvaluesdescription
rangenonow | 1d | 7dhow far ahead to look. now (default) returns only windows active right now; 1d also returns windows starting within the next 24 hours; 7d within the next 7 days.
methodnoa payment instrument (e.g. fps)restrict the result to a single payment method.

example: to fetch the next 7 days of maintenance windows:

{{baseURL}}/service/status?range=7d

response​

a JSON array of maintenance records (an empty array means there is no maintenance in the requested range):

fieldtypedescription
serviceNamestringthe affected rail: fps (FPS scheme) or fps_bank (bank / collection maintenance).
severitystringreject — payments on this rail are rejected for the duration of the window; delay — payments still go through, but confirmation is delayed until the window ends.
serviceStatusstringthe maintenance type, e.g. scheduled_maintenance.
periodStartnumberwindow start, unix timestamp in seconds.
periodEndnumberwindow end, unix timestamp in seconds.
statusstringrecord state, e.g. active.
createdAtstringwhen the record was created (ISO 8601).

example response​

{
"code": 0,
"data": [
{
"serviceName": "fps_bank",
"severity": "delay",
"serviceStatus": "scheduled_maintenance",
"periodStart": 1760745600,
"periodEnd": 1760752800,
"status": "active",
"createdAt": "2026-10-15T09:00:00Z"
}
]
}
how to use severity

branch on severity rather than the service name — reject means do not start a payment on that rail until periodEnd; delay means you may proceed but should tell the customer their confirmation will be delayed until periodEnd.


implementation example​

/**
* fetches upcoming divit service maintenance windows
* @param {string} range - "now" | "1d" | "7d"
* @returns {Promise<Array>} - list of maintenance records
*/
async function getServiceStatus(range = "7d") {
const baseUrl = "https://sandbox-api.divit.dev"; // use the production URL for live
const response = await fetch(`${baseUrl}/service/status?range=${range}`, {
method: "GET",
headers: { "Content-Type": "application/json" },
});
const body = await response.json();
return body.data; // array of maintenance records (empty when there is none)
}