The KetaPay API is organised around REST. It takes JSON request bodies, returns JSON, and uses standard HTTP methods, status codes and bearer authentication.

Base URL

The same URL serves the sandbox and live: the key decides. sk_test_ keys use test money, sk_live_ keys real money, and every object carries livemode. HTTPS only, TLS 1.2 or later. Plain HTTP is refused, not redirected.

Requests

Responses

A successful response is the object itself, with no envelope. Every object has id, an object field naming its type, and livemode.
Lists return { "object": "list", "data": [...], "has_more": true, "next_cursor": "..." } (Pagination). Errors return { "error": { ... } } (Errors).

Formats

OpenAPI

The whole API is described by one OpenAPI 3.1 file, the same one the libraries are built from. Import it into Postman, Insomnia or your own tooling: download v1.yaml.