Decline sandbox request

POST
/providers/{providerID}/sandbox/requests/{requestID}/declines

Decline a sandbox request for payment as the participant in the body. The call runs the payer decline flow and returns the committed decline.

Normal decline eligibility applies. An open request can be declined. A request that is already closed, such as a paid or cancelled request, returns 409 with problem type state-conflict. A committed retry returns the stored result at its original status. Returns 200 with the declined request.

Send X-Idempotency-Key to identify the attempt. Replaying the key with a changed request ID or a changed request body returns 409 with problem type idempotency-key-reused; an identical request that is still active returns 409 with problem type idempotency-request-in-progress. The reservation covers the authenticated caller account, the target provider, and this action. Both problems use application/problem+json.

Returns 400 when the body is malformed or the key is missing. Returns 401 when your credentials are missing or invalid. Returns 403 when the target is a production provider. Returns 404 when the request is not found or belongs to another provider, or when the participant does not belong to the provider.

Auth: API key or bearer token. Application callers must use an application credential authorized for the provider in the path. An affiliated integrator needs the /accounts/{providerID}/moov-money-participants.write and /accounts/{providerID}/transfers.write grants from the FI.

Request
cURL
curl -X POST https://api.moov.money/providers/{providerID}/sandbox/requests/{requestID}/declines \
  -u "$MOOV_API_KEY_ID:$MOOV_API_KEY_SECRET" \
  -H "X-Moov-Version: v2026.10.00" \
  -H "X-Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "participantID": "3v2whagmwvbujhwbt7v3nl6ffq_user"
}'
Responses
200 400 401 403 404 409 429 503
The request completed successfully.
{
  "request": {
    "requestID": "01HF5J9ZKQT4RXP8M2VYBN3D_req",
    "status": "declined"
  }
}
Malformed request: the body or headers failed validation.
Response body application/problem+json
RFC 9457 Problem Details error body, served as application/problem+json. From v2026.10.00, every error response that has a body uses this schema.

type

string required
URI that tells you which problem occurred. Branch on this value; it never changes. Moov problem types look like https://api.moov.money/errors#<code> (for example invalid-request, idempotency-key-reused, or idempotency-request-in-progress). Treat the value as an opaque constant and do not fetch it. about:blank means the HTTP status code says everything there is to know.

title

string required
Short human-readable name of the problem type. Fixed per type; defaults to the HTTP status text.

status

integer<int32> required
The HTTP status code of this response.

detail

string
Human-readable explanation of this specific occurrence.

instance

string
URI reference that identifies this specific occurrence.

errors

array<object>
The request-body fields that failed validation. Present on validation errors only.
Show child attributes

errors[]

pointer

string required
RFC 6901 JSON Pointer to the field, using the public JSON field names. If the field is missing, the pointer shows where it belongs.

detail

string required
What is wrong with the field.
Authentication missing, invalid, or insufficient.
Authentication present but the action is forbidden for this principal/claim.
The requested resource was not found.
Returned when a sandbox decline cannot proceed: the X-Idempotency-Key was replayed with a changed request ID or a changed request body, an identical request with the same key is still active, or the request is not in a declinable state, such as an already-closed request. A committed retry returns the original attempt at its original status instead.
The request exceeded a rate limit. Retry after the whole number of seconds in Retry-After.
Response body application/problem+json
RFC 9457 Problem Details error body, served as application/problem+json. From v2026.10.00, every error response that has a body uses this schema.

type

string required
URI that tells you which problem occurred. Branch on this value; it never changes. Moov problem types look like https://api.moov.money/errors#<code> (for example invalid-request, idempotency-key-reused, or idempotency-request-in-progress). Treat the value as an opaque constant and do not fetch it. about:blank means the HTTP status code says everything there is to know.

title

string required
Short human-readable name of the problem type. Fixed per type; defaults to the HTTP status text.

status

integer<int32> required
The HTTP status code of this response.

detail

string
Human-readable explanation of this specific occurrence.

instance

string
URI reference that identifies this specific occurrence.

errors

array<object>
The request-body fields that failed validation. Present on validation errors only.
Show child attributes

errors[]

pointer

string required
RFC 6901 JSON Pointer to the field, using the public JSON field names. If the field is missing, the pointer shows where it belongs.

detail

string required
What is wrong with the field.
The service is unavailable. The response has no body; retry your request later.

Headers

X-Moov-Version

string
Set this header to the API version being targeted (e.g. v2026.10.00). When omitted, the server applies its default version.

X-Idempotency-Key

string required
Client-supplied key that identifies this create request, 1 to 255 characters. Send the header once. Retries with the same key are processed once for 24 hours after the request completes.

Path parameters

providerID

string required
Your provider account ID.

requestID

string required
Identifier of the request to decline.

Request

application/json
Body for the sandbox request-decline route. The decline runs as the participant in participantID.

participantID

string required
The payer participant whose decline is simulated. The participant must belong to the provider in the path.

Response

Response envelope for the sandbox request-decline route; the committed decline is nested under request.

request

object required
The committed decline.
Show child attributes

request

requestID

string required
The declined request ID.

status

string<enum> required
The request status after the decline, always declined.
Possible values: declined