Overview
HPTS is the sole programmatic interface to the Clarivo lending ledger. All money-movement events — payments, disbursements, daily accruals, reversals — are posted through this API. All balance and history reads are served through this API. Base URL:https://ledger.clarivo.co/v1
Core invariants
Authentication
All endpoints are secured with OAuth 2.0 bearer tokens. Tokens are validated at the API Gateway via a Lambda Authorizer that checks signature,iss, aud, exp, nbf, and
the tenant_id custom claim. Each operation requires a specific scope.
Idempotency
EveryPOST request must include an Idempotency-Key header.
- Keys are scoped per tenant and retained for 24 hours minimum.
- Same key + same payload → returns the original result (
HTTP 200). - Same key + different payload →
HTTP 422withidempotency_mismatch. - Concurrent requests with the same in-flight key →
HTTP 409withidempotency_in_progress.
<event_type>:<resource_id>:<natural_key>
Errors
All errors follow RFC 7807 Problem Details withContent-Type: application/problem+json. Field-level validation failures include an
optional errors[] array with field, code, and message.