Skip to content

SDKs and libraries

Overview

Paradise Gateway provides a RESTful JSON API that works with any HTTP client. While there is no mandatory SDK, using a typed client library can reduce boilerplate, handle authentication, and provide IDE autocompletion.

Direct API integration

Every endpoint in the Paradise Gateway API accepts standard JSON over HTTPS. You can integrate using any language's built-in HTTP client:

LanguageRecommended HTTP client
Pythonrequests or httpx
JavaScript / TypeScriptfetch (built-in) or axios
C#HttpClient (System.Net.Http)
Javajava.net.http.HttpClient (JDK 11+)
Gonet/http (stdlib)
PHPcurl or guzzlehttp/guzzle
Rubynet/http (stdlib) or faraday

Authentication setup

All SDK examples assume you store your API key in an environment variable.

import os
import requests

API_KEY = os.environ["PARADISE_API_KEY"]
BASE_URL = os.environ.get("PARADISE_BASE_URL", "https://api.dev.paradisegateway.net")

session = requests.Session()
session.headers.update({
    "Content-Type": "application/json",
    "APIKEY": API_KEY,
})

resp = session.get(f"{BASE_URL}/v1/transactions?take=5")
print(resp.json())

OpenAPI specification

The Paradise Gateway API is described by an OpenAPI 3.1 specification. You can use it to:

  • Generate typed clients with tools like openapi-generator or openapi-typescript
  • Import into API platforms like Postman, Insomnia, or Bruno
  • Validate requests in your CI/CD pipeline

Generate a client library

# TypeScript client
npx openapi-typescript apis/openapi.yaml -o src/api-types.ts

# Python client
openapi-generator-cli generate \
  -i apis/openapi.yaml \
  -g python \
  -o ./paradise-client-python

# Java client
openapi-generator-cli generate \
  -i apis/openapi.yaml \
  -g java \
  -o ./paradise-client-java

Postman collection

Import the OpenAPI spec directly into Postman:

  1. Open Postman and select Import.
  2. Choose the apis/openapi.yaml file or paste the spec URL.
  3. Postman generates a collection with all endpoints, example payloads, and authentication pre-configured.
  4. Set the APIKEY variable in your environment.

Best practices

  • Store API keys in environment variables — never hard-code them in source files.
  • Set a base URL variable — switch between sandbox and production without code changes.
  • Handle errors consistently — check response_status and response_code on every response.
  • Use the correlation_id — log it for every request; include it in support tickets.
  • Implement retry logic — retry on 5xx errors with exponential backoff. See Integration best practices.

Next steps