Evaluate a Route
POST/v2/routes/:id/evaluation
Shows where a Route would send a payment, without creating one. Send the payment's facts, and either a published version, a tree you have not published, or neither to use the active version. The answer lists the gateway profiles the payment would be sent to, in order, and every node the Route reached on the way. Nothing is charged or stored. Gateway profiles are taken as they are now, so an inactive one is skipped. A roundRobin pool starts where the next payment would start it. A weighted pool draws a new random order on every request, as each payment does.
Request
Responses
- 200
- 202
- 400
- 401
- 403
- 404
- 429
- 500
- 503
- 504
OK
The merchant is entitled but its environment is not provisioned yet. Provisioning has been kicked off (exactly once) and is in progress; retry the request — it succeeds once the environment is ready. Returned only for identity-token (dashboard) requests bound to a merchant, not for secret-key API calls; any such endpoint can return it while provisioning is underway.
The request was rejected. type is invalid_request_error when the request itself is at fault — errors then lists every problem found, with field-attributable entries prefixed by the field’s path; or invalid_state_error when the request was well-formed but the resource is not in a state that allows it.
No API key was supplied, or the key is not valid. type is authentication_error.
The API key is valid but lacks the permission this operation requires. type is permission_error.
No resource exists with the requested identifier. type is not_found_error.
Too many requests. A limit applies per operation; requests to other operations are unaffected. type is rate_limit_error. Use the Retry-After-global header to know when to retry.
Response Headers
Seconds to wait before retrying.
The request could not be completed because of an unexpected error. type is api_error.
The request could not be served right now: the API is temporarily at capacity, or a dependency needed to authorize the request is unavailable — the auth service that verifies credentials, or the entitlement lookup behind it. type is api_error. It is raised before the operation runs, so the request had no effect, and unlike a plain 500 the condition is transient: retry with backoff.
The request exceeded the processing time limit and was abandoned. type is api_error and code is timeout — unlike a plain 500 the request may still have taken effect, so retry with the same idempotency key rather than blindly.