OverviewAbout the API

About the API

A complete reference for the Kadosei API.

Base URL

All API requests are made to the following base URL:

Authentication

The Kadosei API uses two authentication methods depending on the type of request.

Authorization: Bearer ks_live_abc123xyz...

API keys are scoped to an application. Each application can have multiple API keys. Keys can be revoked at any time from the merchant portal or via the API.

Request format

All request bodies must be JSON. Set the Content-Type header on every request with a body.

Content-Type: application/json

Responses

Successful responses return a 2xx status code and a JSON body. The structure of each response is documented on the relevant endpoint page.

Errors

Error responses follow a consistent format:

{
  "statusCode": 400,
  "message": "Validation failed",
  "error": "Bad Request"
}

For validation errors, message may be an array of strings describing each failing field.

Common status codes across all endpoints:

StatusMeaning
400Bad request. The request body or parameters failed validation
401Unauthorised. Missing or invalid credentials
403Forbidden. Valid credentials but insufficient permissions
404Not found. The requested resource does not exist
409Conflict. The request conflicts with existing state
422Unprocessable. The request is valid but cannot be fulfilled
429Too many requests. You have been rate limited
500Server error. Something went wrong on our side
502Bad gateway. A downstream service returned an error
503Service unavailable. Unable to fulfil the request right now
504Gateway timeout. A downstream service did not respond in time

Idempotency

Session creation requests require an Idempotency-Key header containing a client-generated UUID v4. This allows safe retries without creating duplicate sessions. Use a unique key for each new transaction.

Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000

Pagination

Endpoints that return lists support pagination via page and limit query parameters. Responses include the following fields:

FieldDescription
pageCurrent page number (1-based)
limitNumber of items per page
totalItemsTotal number of items available
totalPagesTotal number of pages
hasPreviousPageWhether a previous page exists
hasNextPageWhether a next page exists