Records a payment event and atomically posts the allocated journal
entries per the configured waterfall (fees → interest → principal
by default). Returns the resulting journal_entry_id.
Requires hpts:payments:write scope.
Documentation Index
Fetch the complete documentation index at: https://docs.clarivo.co/llms.txt
Use this file to discover all available pages before exploring further.
OAuth2 JWT bearer tokens. Tokens are validated at API Gateway via a
Lambda Authorizer that verifies signature against the issuer's JWKS,
checks iss, aud, exp, nbf, and the tenant_id custom claim.
Granular scopes are required per operation.
Required on every POST. Must be a deterministic, client-chosen
identifier unique per tenant. Recommended format:
<event_type>:<resource_id>:<natural_key>.
Retained for 24h minimum.
8 - 255^[A-Za-z0-9][A-Za-z0-9._:\-]{7,254}$"payment:loan_42:proc_txn_abc123"
Deprecated — use traceparent instead (ADR-0011).
Client-supplied correlation ID. Accepted until 2026-10-01 for
backward compatibility; will be removed after that date.
^[A-Za-z0-9\-]{8,128}$W3C Trace Context traceparent header for distributed tracing (RFC 7230).
When present, the service extracts the parent span context and creates
child spans under it, enabling end-to-end trace correlation across
API Gateway, the service, and the database.
Format: 00-<trace-id>-<parent-id>-<flags>
^00-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$"00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
W3C Trace Context tracestate header. Carries vendor-specific trace
metadata (e.g. AWS X-Ray sampling decision). Passed through unchanged.
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"11111111-1111-1111-1111-111111111111"
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"11111111-1111-1111-1111-111111111111"
Non-negative integer amount in the currency's minor unit, serialized as a string to preserve precision (JS numbers cannot safely represent values above 2^53). BIGINT on the wire, BIGINT in the database.
1 - 19^(0|[1-9][0-9]{0,18})$"88849"
"10000000"
ISO 4217 three-letter currency code.
3^[A-Z]{3}$"USD"
"MXN"
"EUR"
Accounting date. Must be within an open period.
ach, card, wire, cash, internal Processor/bank reference (e.g., Stripe charge ID).
1 - 255Override default per-program waterfall. Each element is one of "fees", "interest", "principal", in desired allocation order.
1 - 3 elementsfees, interest, principal Free-form key-value metadata. Never used for financial logic.
Size limit 2 KB serialized. Keys must match ^[a-zA-Z][a-zA-Z0-9_]*$.
Idempotency hit. Same key + same payload returned the original result.
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"11111111-1111-1111-1111-111111111111"
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"11111111-1111-1111-1111-111111111111"
RFC 3339 timestamp, UTC.
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"11111111-1111-1111-1111-111111111111"