curl --request POST \
--url https://api.sandbox.nevermined.app/api/v1/router/payments/{id}/settled \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"txHash": "0xfc8af37baae588b5ee4a5e9212532b3d46702ac009b64c17e8ff810fd90ac493"
}
'import requests
url = "https://api.sandbox.nevermined.app/api/v1/router/payments/{id}/settled"
payload = { "txHash": "0xfc8af37baae588b5ee4a5e9212532b3d46702ac009b64c17e8ff810fd90ac493" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({txHash: '0xfc8af37baae588b5ee4a5e9212532b3d46702ac009b64c17e8ff810fd90ac493'})
};
fetch('https://api.sandbox.nevermined.app/api/v1/router/payments/{id}/settled', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.nevermined.app/api/v1/router/payments/{id}/settled",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'txHash' => '0xfc8af37baae588b5ee4a5e9212532b3d46702ac009b64c17e8ff810fd90ac493'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.nevermined.app/api/v1/router/payments/{id}/settled"
payload := strings.NewReader("{\n \"txHash\": \"0xfc8af37baae588b5ee4a5e9212532b3d46702ac009b64c17e8ff810fd90ac493\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.nevermined.app/api/v1/router/payments/{id}/settled")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"txHash\": \"0xfc8af37baae588b5ee4a5e9212532b3d46702ac009b64c17e8ff810fd90ac493\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.nevermined.app/api/v1/router/payments/{id}/settled")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"txHash\": \"0xfc8af37baae588b5ee4a5e9212532b3d46702ac009b64c17e8ff810fd90ac493\"\n}"
response = http.request(request)
puts response.read_body{
"paymentId": "b1f9c2e4-3d5a-4c7e-9f21-6a8b0c4d2e13",
"status": "Settled",
"txHash": "0xfc8af37baae588b5ee4a5e9212532b3d46702ac009b64c17e8ff810fd90ac493"
}{
"code": "BCK.ROUTER.0003",
"httpStatus": 500,
"message": "delegation budget exceeded, expired, or inactive",
"details": "Hash JWT is not signed by the node account",
"error": "authorization_pending",
"hint": "Verify the wallet has sufficient balance and that the plan is active.",
"docsUrl": "https://nevermined.ai/docs/development-guide/api-errors/codes#bck-x402-0008",
"category": "integration",
"retryable": true,
"correlationId": "a3f6b1c4-7d2e-4a9b-8e0c-12f4d8e6c5b9",
"uuid": "e-550e8400-e29b-41d4-a716-446655440000",
"date": "2026-05-09T12:34:56.789Z",
"params": "{\"planId\":\"43298432984329\",\"reason\":\"Invalid configuration\"}"
}{
"code": "BCK.ROUTER.0003",
"httpStatus": 500,
"message": "delegation budget exceeded, expired, or inactive",
"details": "Hash JWT is not signed by the node account",
"error": "authorization_pending",
"hint": "Verify the wallet has sufficient balance and that the plan is active.",
"docsUrl": "https://nevermined.ai/docs/development-guide/api-errors/codes#bck-x402-0008",
"category": "integration",
"retryable": true,
"correlationId": "a3f6b1c4-7d2e-4a9b-8e0c-12f4d8e6c5b9",
"uuid": "e-550e8400-e29b-41d4-a716-446655440000",
"date": "2026-05-09T12:34:56.789Z",
"params": "{\"planId\":\"43298432984329\",\"reason\":\"Invalid configuration\"}"
}{
"code": "BCK.ROUTER.0003",
"httpStatus": 500,
"message": "delegation budget exceeded, expired, or inactive",
"details": "Hash JWT is not signed by the node account",
"error": "authorization_pending",
"hint": "Verify the wallet has sufficient balance and that the plan is active.",
"docsUrl": "https://nevermined.ai/docs/development-guide/api-errors/codes#bck-x402-0008",
"category": "integration",
"retryable": true,
"correlationId": "a3f6b1c4-7d2e-4a9b-8e0c-12f4d8e6c5b9",
"uuid": "e-550e8400-e29b-41d4-a716-446655440000",
"date": "2026-05-09T12:34:56.789Z",
"params": "{\"planId\":\"43298432984329\",\"reason\":\"Invalid configuration\"}"
}Report Settlement
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).
curl --request POST \
--url https://api.sandbox.nevermined.app/api/v1/router/payments/{id}/settled \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"txHash": "0xfc8af37baae588b5ee4a5e9212532b3d46702ac009b64c17e8ff810fd90ac493"
}
'import requests
url = "https://api.sandbox.nevermined.app/api/v1/router/payments/{id}/settled"
payload = { "txHash": "0xfc8af37baae588b5ee4a5e9212532b3d46702ac009b64c17e8ff810fd90ac493" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({txHash: '0xfc8af37baae588b5ee4a5e9212532b3d46702ac009b64c17e8ff810fd90ac493'})
};
fetch('https://api.sandbox.nevermined.app/api/v1/router/payments/{id}/settled', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.nevermined.app/api/v1/router/payments/{id}/settled",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'txHash' => '0xfc8af37baae588b5ee4a5e9212532b3d46702ac009b64c17e8ff810fd90ac493'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.nevermined.app/api/v1/router/payments/{id}/settled"
payload := strings.NewReader("{\n \"txHash\": \"0xfc8af37baae588b5ee4a5e9212532b3d46702ac009b64c17e8ff810fd90ac493\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.nevermined.app/api/v1/router/payments/{id}/settled")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"txHash\": \"0xfc8af37baae588b5ee4a5e9212532b3d46702ac009b64c17e8ff810fd90ac493\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.nevermined.app/api/v1/router/payments/{id}/settled")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"txHash\": \"0xfc8af37baae588b5ee4a5e9212532b3d46702ac009b64c17e8ff810fd90ac493\"\n}"
response = http.request(request)
puts response.read_body{
"paymentId": "b1f9c2e4-3d5a-4c7e-9f21-6a8b0c4d2e13",
"status": "Settled",
"txHash": "0xfc8af37baae588b5ee4a5e9212532b3d46702ac009b64c17e8ff810fd90ac493"
}{
"code": "BCK.ROUTER.0003",
"httpStatus": 500,
"message": "delegation budget exceeded, expired, or inactive",
"details": "Hash JWT is not signed by the node account",
"error": "authorization_pending",
"hint": "Verify the wallet has sufficient balance and that the plan is active.",
"docsUrl": "https://nevermined.ai/docs/development-guide/api-errors/codes#bck-x402-0008",
"category": "integration",
"retryable": true,
"correlationId": "a3f6b1c4-7d2e-4a9b-8e0c-12f4d8e6c5b9",
"uuid": "e-550e8400-e29b-41d4-a716-446655440000",
"date": "2026-05-09T12:34:56.789Z",
"params": "{\"planId\":\"43298432984329\",\"reason\":\"Invalid configuration\"}"
}{
"code": "BCK.ROUTER.0003",
"httpStatus": 500,
"message": "delegation budget exceeded, expired, or inactive",
"details": "Hash JWT is not signed by the node account",
"error": "authorization_pending",
"hint": "Verify the wallet has sufficient balance and that the plan is active.",
"docsUrl": "https://nevermined.ai/docs/development-guide/api-errors/codes#bck-x402-0008",
"category": "integration",
"retryable": true,
"correlationId": "a3f6b1c4-7d2e-4a9b-8e0c-12f4d8e6c5b9",
"uuid": "e-550e8400-e29b-41d4-a716-446655440000",
"date": "2026-05-09T12:34:56.789Z",
"params": "{\"planId\":\"43298432984329\",\"reason\":\"Invalid configuration\"}"
}{
"code": "BCK.ROUTER.0003",
"httpStatus": 500,
"message": "delegation budget exceeded, expired, or inactive",
"details": "Hash JWT is not signed by the node account",
"error": "authorization_pending",
"hint": "Verify the wallet has sufficient balance and that the plan is active.",
"docsUrl": "https://nevermined.ai/docs/development-guide/api-errors/codes#bck-x402-0008",
"category": "integration",
"retryable": true,
"correlationId": "a3f6b1c4-7d2e-4a9b-8e0c-12f4d8e6c5b9",
"uuid": "e-550e8400-e29b-41d4-a716-446655440000",
"date": "2026-05-09T12:34:56.789Z",
"params": "{\"planId\":\"43298432984329\",\"reason\":\"Invalid configuration\"}"
}Authorizations
Your Nevermined API Key (starts with 'nvm:'). Get one at nevermined.app under Settings > API Keys.
Path Parameters
The paymentId returned by POST /router/payments.
"b1f9c2e4-3d5a-4c7e-9f21-6a8b0c4d2e13"
Body
On-chain settlement tx hash (from the upstream's PAYMENT-RESPONSE header).
"0xfc8af37baae588b5ee4a5e9212532b3d46702ac009b64c17e8ff810fd90ac493"
Related topics
Payment ledgerThe x402 railHow the Router worksGuardrails and error codesPublishing Static ResourcesWas this page helpful?