---
title: "Report the on-chain settlement tx for a minted payment (completes the record)"
method: POST
path: "/router/payments/{id}/settled"
tags: ["Router"]
---

# Report the on-chain settlement tx for a minted payment (completes the record)

`POST /router/payments/{id}/settled`

## Request

- Base URL: `https://api.sandbox.nevermined.app/api/v1`
- URL: `https://api.sandbox.nevermined.app/api/v1/router/payments/{id}/settled`
- Auth: HTTP bearer

After you attached a mode-A credential and the agent settled on-chain, report the settlement
`txHash` (from the agent’s `PAYMENT-RESPONSE` / `X-PAYMENT-RESPONSE` header) so the payment
record moves `Issued → Settled`. Idempotent: re-reporting the same txHash is a no-op; a
different txHash, or a record not in `Issued`, is rejected. NOT needed for mode B
(`/route` and `/proxy` self-complete the record from the upstream settlement header).

## Path parameters

- `id` string, required

## Request body

- SettlePaymentDto
  - `txHash` string, required: On-chain settlement tx hash (from the upstream's PAYMENT-RESPONSE header).

## Response `201`

The record is now `Settled`.

- SettleResponseDto
  - `paymentId` string, required
  - `status` 'Settled', required
  - `txHash` string, required

## Other responses

- `401`: Missing/invalid Nevermined API key.
- `404`: No payment record with that id for this caller (BCK.ROUTER.0004).
- `409`: Record not settleable — already settled with a different tx, or not in `Issued` (BCK.ROUTER.0005).

---

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