Router

Read a paid Router result (retained for 24 hours)

Every paid call made through POST /router/route (and its commerce counterpart) is kept for you, the paying user, for 24 hours after it ends, so a response lost on the way back — a client timeout, a dropped connection — can still be read. /router/proxy and /router/svc keep a result only when they answered 202; a response that had already started streaming to you is never stored.

A paid call whose merchant has not answered within 45 s is answered 202 with { paymentId, resultUrl, status: "Pending" } instead of holding your connection (API 1.48 or later). Poll this endpoint:

  • 202, state: Pending — still running.
  • 200, state: Ready — status and body are the relayed response, withheld exactly as the original response would have been.
  • 200, state: Failed — the call ended without a response; failureReason says why.
  • 404 BCK.ROUTER.0030 — nothing to return: expired, never retained, or not a payment of yours (deliberately indistinguishable).
get/router/payments/{id}/result

Request

  • Base URL: https://api.sandbox.nevermined.app/api/v1
  • URL: https://api.sandbox.nevermined.app/api/v1/router/payments/{id}/result
  • Auth: HTTP bearer

Path parameters

idstring required
Example:b1f9c2e4-3d5a-4c7e-9f21-6a8b0c4d2e13

The paymentId of the paid call.

Response

The result is Ready, or the call ended Failed.

paymentIdstring required
state'Pending' | 'Ready' | 'Failed' required
resultUrlstring required
expiresAtstring required

When the result is deleted. Until then only you can read it.

statusnumber nullable

The upstream HTTP status of the paid call. Ready only.

bodyunknown
bodyEncoding'json' | 'text' | 'base64' | 'null' nullable

json — the parsed JSON value; text — a UTF-8 string; base64 — binary, base64-encoded. Null when there is no body.

contentTypestring nullable

The upstream content type, for a streamed call (/router/proxy, /router/svc).

headersobject

The response headers the streamed call would have relayed. Empty for a /router/route result.

failureReasonstring nullable

Why a Failed result has no response.

Example response

{
  "paymentId": "b1f9c2e4-3d5a-4c7e-9f21-6a8b0c4d2e13",
  "state": "Ready",
  "resultUrl": "/api/v1/router/payments/b1f9c2e4-3d5a-4c7e-9f21-6a8b0c4d2e13/result",
  "expiresAt": "2026-09-26T10:12:00.000Z",
  "status": 200,
  "body": {
    "ok": true
  },
  "payment": {
    "paymentId": "b1f9c2e4-3d5a-4c7e-9f21-6a8b0c4d2e13",
    "status": "Settled"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.