Browse documentation

RESOURCES

Arrangements

Installment plans. The total owed is derived from the case balance — never caller-supplied. One active arrangement per case is enforced.

POST/arrangementspayments:writeIdempotency-Key required

Create an installment plan (gateway-first; a failure after provider creation is compensated by automatic cancellation).

Request body

{
  "caseId": "c3d4…",
  "installmentCents": 500,
  "frequency": "daily"
}

Response

{
  "object": "arrangement",
  "id": "…",
  "status": "active",
  "installment_cents": "500",
  "total_owed_cents": "8000",
  "payment_url": "https://…"
}

Example

curl https://debt.hlhunt.org/api/v1/arrangements \
  -H "Authorization: Bearer hlh_live_..." \
  -X POST \
  -H "Idempotency-Key: my-unique-key" \
  -H "Content-Type: application/json" \
  -d '{ "caseId": "c3d4…", "installmentCents": 500, "frequency": "daily" }'
GET/arrangements/{id}payments:read

Retrieve an arrangement (status, schedule, totals, hosted payment URL).

Response

{
  "object": "arrangement",
  "id": "…",
  "status": "active",
  "total_paid_cents": "1500"
}

Example

curl https://debt.hlhunt.org/api/v1/arrangements/ID \
  -H "Authorization: Bearer hlh_live_..."