Authentication & Signing
Accessing OristaPay Open APIs requires dual authentication:- OAuth2 Access Token — proves the caller’s identity
- HMAC Request Signature — proves the request has not been tampered with
Every request must pass both layers of verification. Failure of either results in 401 Unauthorized.
1. Obtain Access Token
Standard OAuth2client_credentials flow.
Request
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. Request Signature Algorithm
String to Sign
Reference Implementations
- Python
- Java
- Node.js
3. Request Header Specification
All business requests must carry the following headers:Request & Response Conventions
Protocol SpecificationResponse Envelope
All responses use a single-layer JSON{ code, message, data? }, returned by the downstream business service without additional gateway wrapping.
Success (Business OK)
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
Route not found, internal gateway errors, missing descriptors, etc. HTTP status uses the corresponding error code (e.g. 400 / 404 / 500 / 502), with response body still using {code, message}:
- HTTP status reflects transport layer results:
2xxmeans the request was successfully delivered and converted; non-2xxindicates a gateway-side error - Business code
codereflects business layer results:1means business success with result indata; other values are business error codes with reason inmessage - How to determine success: HTTP
2xx+ businesscode == 1. Both conditions must be met - Authentication errors: Any failure in
Authorization/X-Signature/X-Timestamp/X-Noncereturns HTTP401with{"code":401,"message":"Unauthorized"}
Error Handling
HTTP Status Codes & Business Codes
All responses use the single-layer envelope{code, message, data?}. HTTP status reflects gateway/transport results; business code code reflects business processing results.
Authentication Failure Checklist
All authentication errors return:- Is the token valid? — Has it expired? Was it issued by the current
api_key? - Does the signature match? — Do
METHOD / PATH / BODYmatch the actual request? - Is the timestamp within the window? — Is the local clock synchronized with NTP?
- Is the nonce unique? — Must not be reused within 5 minutes under the same
api_key.
Rate Limiting
Rate Limit Exceeded Response Example
For higher quotas, contact your account manager. Adjustments take effect the following minute.

