KashierDevelopersKashier Developers
Dashboard API

Dashboard API

Dashboard API request, response, and pagination format

Automate nearly everything you can do in the Kashier dashboard from your own application. The API is REST-shaped and organized around the main resources, with a few exceptions. This page covers the request, response, and pagination format shared by every endpoint.

Capabilities are enabled per merchant

Seeing an endpoint in these docs does not mean your account can call it. Some capabilities must be enabled for your account by Kashier; contact your account manager. If a request fails even though your keys are valid and the path is right, an unenabled capability is a likely cause. Examples include instant settlement and connected accounts.

Ask your Kashier account manager to enable a capability, and check the permissions on your secret key if a call is still rejected.

Sample requests

Every method comes with a cURL sample — drop in your own parameters and run it from the command line.

Requests and responses

Both request body data and response data are formatted as JSON. The content type for responses will always be application/json.

The envelope differs by endpoint; see each endpoint's reference. Many v2 endpoints — including the transaction and reporting reads — wrap their result like this:

{
    "body": [object|array], // the result of your request
    "message": [string],    // informational summary. Log it, do not branch on it
    "pagination": [object]  // list endpoints only
}

Others return the result under data instead — { "message": ..., "data": ... }, with pagination alongside it on list reads — and some carry a top-level status. Read the response sample on the individual endpoint's page rather than assuming one shape for the whole API, and code defensively for a result that may arrive under either body or data.

Use the HTTP status code to determine the result of an API call. Where a top-level status field is absent, do not test for one.

Message key

The message key is a string containing a summary of the response. For example, when retrieving a list of transactions, the message might read: The payment transactions has been retreived successfully.

The wording is informational and can change. Do not use it for checks.

Body key

The body key contains the result of your request. It can be an object or an array, depending on the endpoint. For example, a request to retrieve a list of transactions returns an array of transaction rows in body.

{
  "body": [
    { "transactionId": "TX-XXXXXXXXXX", "status": "Approved", "amount": 105, "currency": "EGP" }
  ],
  "pagination": { "total": 715, "page": 1, "limit": 1, "pages": 715, "lastPage": 715 },
  "message": "The payment transactions has been retreived successfully"
}

Pagination

The pagination key provides context for the body key's contents. For example, when retrieving a list of transactions performed by a merchant, pagination parameters can limit the result set.

Request pagination with the page and limit query parameters — page is 1-based, limit is the number of records per page. List endpoints validate their query string strictly: an unrecognized query key is rejected with a 400, so a misspelled or invented parameter name fails the whole request rather than being ignored.

Pagination differs by endpoint in shape, not just in field names. There are two forms, and they are not interchangeable.

Form 1 — a separate pagination key. Used by the transaction and reporting reads shown above: body is the array, and pagination sits beside it.

{
  "body": [ { "transactionId": "TX-XXXXXXXXXX" } ],
  "pagination": { "total": 715, "page": 1, "limit": 1, "pages": 715, "lastPage": 715 },
  "message": "The payment transactions has been retreived successfully"
}

Form 2 — paging fields inside body. Other v2 list endpoints return a paginated document instead: body is an object holding docs plus the paging counters, and there is no pagination key at all.

{
  "message": "Connected-account relationships retrieved successfully",
  "body": {
    "docs": [ { "_id": "507f1f77bcf86cd799439011", "status": "PENDING" } ],
    "totalDocs": 1,
    "limit": 10,
    "page": 1,
    "totalPages": 1,
    "hasNextPage": false,
    "hasPrevPage": false
  }
}

Check whether body is an array or an object before reading paging data, and don't assume pagination exists.

Keys

The Form 2 fields above. The response may also include pagingCounter, prevPage and nextPage; treat them as optional and don't require them.

KeyDescription
totalDocsThe total number of records matching the query across all pages.
limitThis is the maximum number of records that will be returned per request. Set it by passing a limit query parameter. The default varies by endpoint — order search and settlement-window reads default to 20 — so check the endpoint's own reference rather than assuming a single value.
totalPagesThis is how many pages in total are available for retrieval, given the records per page in limit.
pageThis is the current page being returned. This is dependent on what page was requested using the page query parameter, which is 1-based. Default: 1
pagingCounterThis is the starting number of first record for retrieval considering the maximum records per page specified.
hasPrevPageThis is boolean to give availability of prev page.
hasNextPageThis is boolean to give availability of next page.
prevPageThis is order of previous page if available or NULL.
nextPageThis is order of Next page if available or NULL.

On this page