Skip to content

Official SDKs

Zayono publishes maintained SDKs for the 4 most-used languages in payment integration. They wrap authentication, automatic retries, pagination, webhook signature verification, and expose a typed API idiomatic to the host language.

Shared conventions

All Zayono SDKs share the following conventions — learn them once, use them everywhere:

Authentication

Every request uses an API key in the zyn_test_... (sandbox) or zyn_live_... (live) format, passed in the Authorization: Bearer <key> header. See Authentication.

Idempotency

All mutating requests (POST / PATCH / DELETE) accept an Idempotency-Key header. The SDKs generate one automatically if you don't supply it. See Idempotency.

Retries

Network failures / 5xx / 429 are retried automatically with exponential backoff (3 attempts by default, 250ms → 1s → 4s). Configurable per client.

Pagination

List endpoints (/payments, /payouts, /customers) return a paginated envelope:

json
{
  "data": [/* ... */],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 142,
    "last_page": 10
  }
}

Every SDK exposes an async iterator that walks through the pages automatically.

Errors

The SDKs throw a typed exception per error class:

  • AuthenticationException — invalid or revoked key
  • ValidationException — invalid fields (errors details field by field)
  • RateLimitException — rate limit exceeded
  • ResourceNotFoundException — 404
  • ServerException — 5xx (already retried)
  • NetworkException — connection failure / timeout

See Error handling.

Webhooks

Each SDK exposes a verifyWebhook(payload, signature, secret) helper that validates the HMAC-SHA256 signature of the raw body and returns true/false. See Signature verification.

Distribution

LanguagePackage managerRepo
PHPpackagist.org/packages/zayono/zayono-phpgithub.com/zayono/zayono-php
Laravelpackagist.org/packages/zayono/zayono-laravelgithub.com/zayono/zayono-laravel
Node.jsnpmjs.com/package/@zayono/sdkgithub.com/zayono/zayono-node
Pythonpypi.org/project/zayonogithub.com/zayono/zayono-python

Versioning

Every SDK follows SemVer:

  • Major (1.x → 2.x): breaking changes documented in the Changelog
  • Minor (1.0 → 1.1) : new backward-compatible features
  • Patch (1.0.0 → 1.0.1): bugfixes

The Zayono API itself is versioned via the /api/v1 prefix. A major API version bump (/v2) triggers a major SDK bump.

Roadmap

SDKCurrent versionUpcoming features
PHP1.0.0Async via ReactPHP, PSR-14 event support
Laravel1.0.0Artisan commands, auto-dispatched queue jobs
Node.js1.0.0Streaming responses, WebSocket subscriptions
Python1.0.0Async via native asyncio, Django middleware

Official Zayono API documentation