7. OpenAPI Specification
The API is described by a machine-readable specification in OpenAPI 3.1 format. The full JSON schema is published at https://doc.payneteasy.com/openapi.json.
You can use it to:
browse the API interactively in your browser
generate client SDKs in your language of choice
import the API into tools such as Postman or Insomnia
feed it to AI coding assistants to generate clients and integrations
7.1. Response Format
By default the gateway returns responses in
application/x-www-form-urlencoded format — the same as it always
has. This behaviour is unchanged: when you send no special Accept
header, you keep receiving form-encoded responses exactly as before.
To receive the same data as JSON instead, send the
Accept: application/vnd.pay+json request header. A JSON response is
easier to deserialize, especially when you parse the response by hand.
This affects the response only — the request body is still sent
as application/x-www-form-urlencoded in both cases, with or without
the header.
Default response (application/x-www-form-urlencoded):
type=async-response
&serial-number=00000000-0000-0000-0000-000002d9b22a
&merchant-order-id=inv4097763
&paynet-order-id=6768788
&end-point-id=22903
The same response when the request includes
Accept: application/vnd.pay+json:
{
"type": "async-response",
"serial-number": "00000000-0000-0000-0000-000002d9b22a",
"merchant-order-id": "inv4097763",
"paynet-order-id": "6768788",
"end-point-id": "22903"
}
7.2. Interactive Documentation
The full API reference is available online as interactive OpenAPI documentation — no tools or downloads required. Open it in your browser to browse every endpoint, review request and response parameters and data schemas, and send test requests right from the page:
7.3. SDK generation
OpenAPI Generator is a free,
open-source tool that reads an OpenAPI specification and generates
ready-to-use client SDKs, server stubs, and documentation for more than
50 languages. Its command-line interface, openapi-generator-cli, is
the quickest way to turn the specification above into a working client.
Install it using any of the methods below (see the installation guide for all the options):
npm install @openapitools/openapi-generator-cli -g
brew install openapi-generator
docker pull openapitools/openapi-generator-cli
# requires Java 11+; replace <version> with the latest release from
# https://github.com/OpenAPITools/openapi-generator/releases
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/<version>/openapi-generator-cli-<version>.jar \
-O openapi-generator-cli.jar
java -jar openapi-generator-cli.jar version
Then generate a client in the language of your choice:
openapi-generator-cli generate \
-i https://doc.payneteasy.com/openapi.json \
-g java \
-o sdk-java
openapi-generator-cli generate \
-i https://doc.payneteasy.com/openapi.json \
-g python \
-o sdk-python
openapi-generator-cli generate \
-i https://doc.payneteasy.com/openapi.json \
-g typescript-fetch \
-o sdk-ts
openapi-generator-cli generate \
-i https://doc.payneteasy.com/openapi.json \
-g php \
-o sdk-php
openapi-generator-cli generate \
-i https://doc.payneteasy.com/openapi.json \
-g csharp \
-o sdk-csharp
openapi-generator-cli generate \
-i https://doc.payneteasy.com/openapi.json \
-g go \
-o sdk-go
openapi-generator-cli generate \
-i https://doc.payneteasy.com/openapi.json \
-g ruby \
-o sdk-ruby
openapi-generator-cli generate \
-i https://doc.payneteasy.com/openapi.json \
-g kotlin \
-o sdk-kotlin
openapi-generator-cli generate \
-i https://doc.payneteasy.com/openapi.json \
-g swift5 \
-o sdk-swift
openapi-generator-cli generate \
-i https://doc.payneteasy.com/openapi.json \
-g rust \
-o sdk-rust
openapi-generator-cli generate \
-i https://doc.payneteasy.com/openapi.json \
-g dart \
-o sdk-dart
openapi-generator-cli generate \
-i https://doc.payneteasy.com/openapi.json \
-g cpp-restsdk \
-o sdk-cpp
7.4. Using AI Agents
AI coding assistants — such as Claude Code, ChatGPT, Cursor, and Windsurf — can read an OpenAPI specification and generate a client or integration automatically.
Copy the prompt below into your AI assistant and adjust the target language and requirements as needed:
Generate an API client from this OpenAPI specification:
https://doc.payneteasy.com/openapi.json
Requirements:
- target language: Python (or TypeScript, PHP, Java, ...)
- create a typed API client class
- generate request and response models
- include usage examples