Quick start
Make your first API call in three steps:Credentials
IP allowlists
Exchange and confirm both parties’ public egress IPs before integration testing, separately for UAT and PRD. Do not use private IPs or gateway ingress IPs resolved from DNS. IP allowlisting does not replace authentication or signature verification.
Environments
Authentication & Signing
Accessing OristaPay Open APIs requires dual authentication:- OAuth2 Access Token — proves the caller’s identity
- Request signature — protocol v2 (Ed25519) — proves the request was signed by your private key and has not been tampered with
Every request must pass both checks; otherwise it is rejected.
Signature protocol v1 (HMAC-SHA256) remains supported and is scheduled to reach EOL on 2027-01-31 at 24:00 (UTC+8) for API requests and JSON callbacks. Use signature protocol v2 (Ed25519) for new integrations.
X-Signature-Version.
1. Obtain Access Token
Standard OAuth2client_credentials flow (UAT example below).
Request (URL-encode form parameter values)
access_tokencan be reused withinexpires_inseconds. Cache it and refresh proactively 30 seconds before expiry.access_tokenmust be issued by the OAuth client corresponding toX-Api-Key.
2. Signature protocol v2 (Ed25519)
Generate your own Ed25519 key pair. Provide only the public key to OristaPay and keep the private key secure.
Generate the key pair using OpenSSL:
String to Sign
Join the following fields with LF (\n), encode as UTF-8, and do not add a trailing newline:
Signature Calculation
=. Sign and send the same body bytes; preserve query order and percent-encoding. Do not decode the URL, re-serialize JSON, or reuse a signature after a redirect.
Field Definitions
Reference Implementations
- Python
- Java
- Node.js
- Go
ed25519_example.py
V2 request headers
API requests do not use
X-Signature-Key-Id. Re-sign every retry with a fresh timestamp and nonce; v2 nonces are retained for 11 minutes. Keep the business idempotency key unchanged.
3. Callback signature verification
For JSON callbacks, verify the platform’s signature with its public key. OAuth tokens are not required. Business events and payloads are described in the relevant API’s Callback section.Retrieve and cache the platform JWKS
kid values. Cache JWKS per environment using Cache-Control and ETag. Select the public key matching X-Signature-Key-Id in the callback headers and validate the JWK fields above.
An unknown kid or failed verification may indicate an expired local key cache or key rotation. Refresh /public/callback/keys with rate limiting, then retry verification once using the same kid. Reject if verification still fails, the key is missing, or refresh fails. Never try a different kid, accept a callback-supplied key URL, or fall back to HMAC.
V2 callback headers and payload
Verification and acknowledgement
- Reject missing or duplicate signature headers. Check version
2, expected client ID, and timestamp (±5 minutes). - Select the platform key by
kidand verify against the raw body bytes, before parsing JSON. - After verification, atomically store
(client_id, nonce)for at least 11 minutes to prevent replay. Reject if verification or replay storage fails. - Apply business idempotency using a stable event key. Nonce is not an idempotency key: retries receive a new signature and nonce.
- Return HTTP
2xxpromptly after durable acceptance. Only HTTP status acknowledges delivery;429,5xxand network failures are retried, other4xxare not.
Callback verification examples
Pass the JWKSkeys array, callback headers, original path/query and raw body; the expected client ID comes from your configuration. Reject duplicate signature headers first, and apply replay protection and business idempotency after verification.
- Python
- Java
- Node.js
- Go
callback_verify.py
4. Migration checklist
- Register your Ed25519 public key and switch API requests to v2.
- Add JWKS retrieval and v2 callback verification. Coordinate the callback version separately with the platform.
- Complete both migrations before the protocol v1 EOL. Dispatch by version during migration; never fall back after a verification failure.
client_secret remain unchanged.
5. Signature protocol v1 (HMAC-SHA256, EOL: 2027-01-31)
V1 uses the sharedsign_secret. Omit X-Signature-Version or set it to 1 while v1 is enabled.
String to Sign
Signature Calculation
Field Definitions
Reference Implementations
- Python
- Java
- Node.js
- Go
Legacy v1 request headers
All business requests must carry the following headers:Legacy v1 callback verification
Before the cutoff, clients explicitly configured for JSON/HMAC callbacks verify using their sharedsign_secret:
1, with no kid. Use the decoded URL path without query and compare HMAC in constant time. Apply the client, timestamp, replay and acknowledgement checks in §3.
Request & Response Conventions
Protocol SpecificationResponse Envelope
Downstream business responses use a single-layer JSON{ code, message, data? }, without additional gateway wrapping.
Successful response
Business code code = 1, business data in data:
200, with error details expressed by code / message:
200, code is a negative integer (negated gRPC StatusCode, e.g. -14 for UNAVAILABLE), with connection error details in message.
Gateway-Level Error
For routing failures, internal gateway errors, missing descriptors, and similar errors, the HTTP status reflects the error (e.g. 400 / 404 / 500 / 502). The response is a single-layer JSON object with error details in message or reason:
- HTTP
2xxdoes not imply business success or guarantee downstream delivery; always check the businesscode - Business code
codereflects business layer results:1means business success with result indata; other values indicate errors, with details inmessageorreason - How to determine success: HTTP
2xx+ businesscode == 1. Both conditions must be met - Authentication/signature errors may use
{code, reason}; see the checklist below.
Error Handling
HTTP Status Codes & Business Codes
Responses use a single-layer JSON envelope, with error details inmessage or reason. HTTP status reflects gateway/transport results; business code code reflects business processing results.
Authentication Failure Checklist
For v2 signature rejection, common outcomes include:
Check token expiry/client binding first, then version/key, exact payload bytes, clock and nonce uniqueness.
Rate Limiting
Rate Limit Exceeded Response Example
429, wait for the number of seconds in Retry-After, then retry with a fresh timestamp, nonce and signature. The delay is calculated dynamically; 30 above is only an example.
To adjust your quota, contact your account manager.

