---
title: "Settle a premium-assessment payment in credits with an idempotency key"
method: POST
path: "/v1/payments/settle"
tags: ["Rights desk"]
---

# Settle a premium-assessment payment in credits with an idempotency key

`POST /v1/payments/settle`

## Request

- Base URL: `https://www.rightshold.com`
- URL: `https://www.rightshold.com/v1/payments/settle`
- Auth: one of:
  - none
  - HTTP bearer

## Headers

- `X-Request-Id` string

## Request body

- object: Fields seen in accepted requests; required ones are proven by tests (omitting each returns a 4xx naming it).
  - `agent_id` string, required
  - `idempotency_key` string, required
  - `amount_micro` integer, required
  - `operation` string

## Response `200`

OK

- object: Inferred from 3 recorded responses; required fields appeared in every one; additional properties may appear.
  - `ok` boolean, required
  - `payment` object, required
    - `id` string, required
    - `idempotency_key` string, required
    - `agent_id` string, required
    - `operation` string, required
    - `amount_micro` integer, required
    - `state` string, required
    - `created_at` string, required
    - `receipt_id` string, required
  - `duplicate` boolean, required
  - `reasons` unknown[], required
    - unknown

## Other responses

- `400`: Problem details: a stable error code, type URI, title, status and an explanation
- `401`: Problem details: a stable error code, type URI, title, status and an explanation
- `404`: Problem details: a stable error code, type URI, title, status and an explanation
- `405`: Problem details: a stable error code, type URI, title, status and an explanation
- `422`: Problem details: a stable error code, type URI, title, status and an explanation
- `429`: Request budget exhausted; retry after Retry-After seconds
- `500`: Problem details: a stable error code, type URI, title, status and an explanation

---

[API](https://skmtc.dev/rightshold/apis/rightshold-api.md) · [All operations](https://skmtc.dev/rightshold/apis/rightshold-api/llms.txt) · [OpenAPI document](https://skmtc.dev/rightshold/apis/rightshold-api/revisions/cfe84fdde1ca?raw)
